I see the logic if you have to live in, say, the New York City region... But the fact is, you don't.
I live in a suburb of a moderate-sized southern city and work as a data scientist at a technology company just outside of downtown. The pay is good, the commute is 15 minutes one-way (pretty much 100% of the time, too), the cost of living is phenomenal, and I'm within walking distance of all the shopping, eating, mountain biking, hiking, and boating I could want to do in an average week.
I have no idea why folks seem to think NYC and the Bay Area are the only places you can possibly live...