Big cities and metropolitan areas are generators of their flavor of culture, and that influences the kind of work objects that the local labor pool can produce.
Many of the cities on GP's list are actually major tech hubs (Tokyo, Sao Paulo, NYC, LA), and many of the other cities (Cairo, Mexico City, LA) are major creative centers for other industries especially media/entertainment industries for their respective spheres of orbit.
Because the owners and operators of the companies in question are usually left of center (American spectrum)?
There are things that liberal areas are worse at, of course: housing costs are usually higher, they're not as accommodating to religion, taxes are higher, some regulations can be stifling. But most techies are less concerned with these latter things than the former.
There's a reason that the major tech hubs in the US are liberal cities, and more conservative ones generally don't have a strong tech sector.