Well for one, guys do it too. Not nearly as much, but they still do it.
And sometimes, I dont think they're being attention whores. Most of the time, sure. But not all the time. Sometimes people just have a skewed self-awareness. For instance, I'm better looking than Cootie. But Timmy is way better looking than me. (Just an example. I'm far sexier than both of them.) But if feel like I'm actually below Cootie, and I mention it in a normal concersation, It's not attention whoring. I'm simply stating what I believe to be true. Even though it's clearly false.
The key is how often they bring it up, and how forcefully they steer the conversation that way.