I think it's a bit presumptuous to categorize extreme exercise as "just to impress their friends". Was Alex Honnold free soloing El Cap just to impress his friends? I doubt it. The same can be said for almost all extreme challenges. Why climb Everest? Why run a marathon? Why go to the moon?
To crib JFK: Because it's hard. Because you can. Because it's there and it's maaaybe, just maybe, possible.
Regarding my last sentence, perhaps I could have phrased it better like this: I would rather destroy my body through hard work by trying to achieve difficult things like an IM triathlon than destroy my body out of apathy and sloth and gluttony. Either way, if all goes to plan, my body is gonna go to shit at a certain point anyway and I can't do anything about it. And then I die. So why not try to have some fun?