I'll admit I do it when I'm lifting really heavy weights but it's an involuntary response.
And if anyone just assumes guys do that for attention, tell me do you apply the same logic when girls wear skin-tight leggings, sports bras and makeup to the gym?