Isn't it the opposite? Larger city -> denser population -> more public transport demand -> better public transport?

Better doesn’t always follow. Nyc has had constant public transit demand but there’s been barely any expansion since public takeover of the private subways.