When you have a 2-seat sports car you can't be the one who drives when the team goes out to lunch. If your car looks more expensive than your coworkers' cars, they start to gossip about how you can afford it.
Declaring it a midlife crisis is an attempt to get ahead of that. They're saying that they didn't buy it to avoid driving the team to lunch. They're saying that it's a rare treat, not something they could easily afford. They're saying that this car isn't their personality, it's something they wanted to enjoy.
Is any of this necessary? No. But it might cut down on rumors, and that put their mind at ease.
A number of my friends have said this as a joke (the kind of joke someone finds funny when they have a stable job, stable marriage, and a couple of kids, I guess)
A few others have definitely not been joking, and hey, if the red sportscar and chasing women half your age lets you momentarily forget about how much you hate your job, your mortgage, and your ex-wife... I can't really find fault with that?