Speaking only for myself, I didn't buy a house in the suburbs because "the commute was ok", I bought a house in the suburbs because it was the only place I was able to purchase a place to live.
My rent on my 1-bedroom apartment near the city was $500 a month more than the mortgage+property taxes in the suburbs. The mortgage is constant, the house is appreciating value, some of the mortgage goes towards the principal and I "keep" that. The rent was going up 5-10% per year.
The commute was not ok. But I couldn't afford not to. $500 a month is $500 a month.
In the decade or so since, my house appreciated significantly in value, and I was able to purchase a house 5 minutes from work. But I could not have done that without sacrificing much of my sanity for a not-ok commute for nearly a decade.
The reality is that housing and traffic are deeply, deeply entwined.
No, the reason they do it is to buy a house with three bedrooms and a yard for $225k instead of, say, paying $4000/mo for a shoebox they can never meaningfully aspire to own. The Commute is only a candidate reason they wouldn't make the move.
(And if large cities had sane housing policies and lots of supply, this all might be less of a problem, but, well, that's not our world.)
the better a drive is, the more people will do it. "the commute is actually okay" is the reason people buy houses in the suburbs. the people buying houses in the suburbs are the reason the commute becomes terrible. if the drive sucks, people will find a way to avoid it, whether that's finding recreational opportunities close to home, taking transit, buying a house in the city, or finding a job close to home (or working remote)