If you spend 2 hours in transit... or 20 minutes. If you "invest" or "spend on frivolities"... If you use your time more productively instead of sitting on a bus/in a car...
While the trade off might not make sense to you, it obviously does make sense to the GP.
I live on family property... and it would actually cost more (no rent/mortgage... vs something new) to live close to work, but I would get ~2 hours of driving (~1 each way) if I moved closer. Due to a variety of reasons, I stay where I'm at.
Due to a variety of reasons, other people choose to move closer.
Just because they aren't super efficient (wasting money/time, as you seem to suggest), doesn't mean they aren't better off with that decision.
Having done both (short and long commutes), I'd say yes, but only in the short term. There's a distinct joy in not taking any form of powered transit to work. You feel it with every step you take walking in the mornings.
Eventually that joy wears off though as you realize that you haven't saved squat over the past N years and if that trend continues, you'll eventually get priced out of renting too!
Growing up, I lived closer to where I worked... I'd walk or bike to work. Getting older, I moved around and anything I've done in the longest time requires "long" commutes (30-60 minutes each way). I've been on both sides and am fine with either.
Given a slightly modified set of circumstances, I would probably pay a bit more to shave an hour or two off my commute... the added time and lessened stress (so many bad drivers on the roads... more time to play CoD...) would be worth it.
I am lucky enough to live on Family Property - so the economic benefits of having zero rent/mortgage can't be understated (and is a major reason I commute) but it does come at an expense in time commuting.
Homes as a trick to saving or not spending seems vacuous, it's like the enforced marriage wedding debt hyped up about a certain tribe in the phillipines. If you need to be deeply in debt to spend money wisely, something is wrong.
While true on paper here's what really happens to most people:
1) They spend the extra time working instead of what they would otherwise consider family/fun/relax time.
2) If buying a place costs X and renting costs Y, they end up spending (Y-X) frivolously and getting accustomed to that level of spending.
If nothing else, owning a home tricks/forces/cajoles people into saving money. Sure you can argue, "I'll save the difference and invest it at Z% ... Win!" but that's not what the VAST majority of people will do.