Reader TGGP provided a link to an academic paper explaining it.
Primarily, the poor live where there is access to public transportation. Secondarily, the poor live in cities because the cities provide better welfare benefits.
The reason why the poor like public transportation is that it’s cheaper than owning a car (which has high fixed costs). The reason why rich people like cars is because it’s faster per mile than public transportation, and rich people have the money to spend in order to save time getting where they are going.
This creates a feedback loop. The poor move to cities, and then vote for Democratic politicians who give them more benefits, thus making the city even more attractive to the poor.
Other important findings in the paper: (1) creating public transportation will attract poor people to a neighborhood (this was studied in areas where new public transportation infrastructure was built); and (2) the rich are willing to pay money to avoid living next to poor people (which, of course, I already knew).
So we see, creating public transportation is the worst thing a city can ever do. The public transportation attracts poor people, which causes rich-people to move away from the poor people, causing the city to become more Democratic and liberal resulting in more government benefits for the poor which attract more poor people.