Disguise tricks are a standard survival trick for characters with sufficient command of toon physics. When they are being chased by an enemy and can get out of sight for a moment, they can pull disguises from nowhere and improvise a situation. The enemy will be completely taken in, at least for a little while. Scooby-Doo and Shaggy Rogers are well known for using disguises to comedically outwit the ghosts.
In the case pictured here, they shrieked and complained when the villain came into the room. The villain backed off and apologized for intruding. A little later, he said to himself, "Wait a minute! I don't have any dancing girls!" (Scooby's Desert Dilemma).
- Older cartoon characters such as Bugs Bunny are the real masters of this trick.