Answer
When you beat the rug, it moves back, but the dust over it does not go with the rug. (Newton's First Law of Motion)
Work Step by Step
When we hit the rug with the tennis racket, we in fact cause it to accelerate rapidly. According to Newton's first law of motion, the applied force on the rug produces acceleration in it while the dust experiences less acceleration as compared to the rug. Thus, it will be left behind and in this way, the rug gets cleaned.