Among serious riders, one of the goals is to hide your pain. Racers do it because it's tactically useful - if you pass somebody and don't look like you're working too hard, they're less likelly to chase.
Serious riders do it because racers do it, and to taunt their friends.
It's the same reason that people speed up when they pass you.