Dear Student ,
A rubber sucker works by creating a vacuum between the rubber cap and the surface and due to atmospheric pressure the rubber sucker sticks to the surface. On a rough surface vacuum can not be created between the cup and the surface, since all the air between the cup and the surface does not escape. The remaining air between the cup and the rough surface exert pressure on the inner wall of the cup, due to this it does not stick on the rough surface.
Regards