I study these kinds of demographic trends as a hobby. There's been a lot of great literature on it lately. Check out management consulting firm
McKinsey's excellent in-depth report on this and why it's only going to be exacerbated over the coming decades.
Gist of it is: Due to multiple factors (there's no 1 culprit here), the US economy is dividing into two classes, with high-knowledge workers on one end and service workers on the other (since the middle class has been largely hollowed out. Automation/outsourcing has killed traditionally middle-class jobs, not low-end service jobs.)
Firms know that in the intense battle for talent, they have to be in the types of cities (superstar cities) that attract top talent. And top talent likes going to where they can max out their pay. But, also interestingly, when high-paying jobs are created, they also produce this service-job ripple effect because now there is more demand (from the new highly-paid knowledge worker) for people like servers, bartenders, yoga teachers, babysitters, food delivery guys, etc. The problem is that these service workers are paid poorly. But they go to these superstar cities anyway because it's still better than what they could get in their hometown of Billings, Montana or Zanesville, Ohio.
I'm also a bit of a conspiracy theorist, so I think this is all part of the rich capitalists' plans. Destroy the middle class, place 90% of them in ****ty McJobs solely designed to service the highly-paid smart people with their advanced degrees who will use their smart brains to keep the billionaires as billionaires (while being allowed to at least make enough to take care of their families and take comfort that well at least they're not one of the McJob-havers).
It's also why cities like NYC have such excellent public transit systems. Those were built to allow the poor to shuttle in everyday from 2+ hours away to work their ****ty McJobs (cuz otherwise, they'd just move away, and you'd have to start paying them more to keep them there). The rich don't use public transit.