40 miles is quite a lot if you don't own a car. In the city I live in, it would take me several hours of commuting (including several inter-system transfers) to get to an office that's 40 miles away from me.
Indeed -- I live just under 40 miles from a Salesforce office, and I used to work at Salesforce. I went fully-remote as soon as I could, because living just under 40 miles away meant that my commute was typically an hour and a half _each way_, sometimes worse than that if there was any sort of atypical congestion.
I used to commute 1.5-2 hours a day for 6 years since I was a junior after the recession and had no options. Nowadays as a highly valued senior, no fucking way.
My pre-pandemic commute was 40 miles, including three interstate highways, averaging 2hours each way, sometimes up to 3hours when busy. Did that one for 10 years.
Took remote work as soon as company offered it and will never go back to the commute.
The big tech companies executing on these return-to-office "strategies" aren't in "most of the US"; they're in very specific large metropolitan areas of the US (and also, large metropolitan areas of other countries.)