I think the strong Democrat tilt of state capitals has more to do with how far the Republicans have gone to the right.
No, there are a few reasons for this. Public-sector workers are the most likely to be unionized, and the fact their paycheck comes from the government gives the bigger-government party a natural advantage in the capital. Also, Democrat identity politics keep delivering blocs of votes. Another element is self-selection; people who move to the city or the suburbs may well harbor different value systems.
Lemme make sure I have this right:
Hispanics, African-Americans, and Asians voting overwhelmingly Democratic="Democrat identity politics".
Southern whites voting overwhelmingly GOP="anti-socialist FF"?
Just checking.