You maybe did it for a larger house. Or maybe for cheaper rent/mortgage.
We're not talking here about folks on minimum wage who can only afford to live 2 hours outside of the city they are working in.
The highly paid software engineers on hackernews could absolutely afford to live 5 minutes from the office, 30 minutes from the office, or 2 hours from the office.
They could afford to move to a city with good transit where they can only afford an apartment, or to a city with no transit where they can afford a giant mansion.