This is why we have the electoral college, so states like California and New York can’t steal elections with illegal votes.
Sure they can, by stealing states with a large number of electoral college votes. California is an excellent example of that. The electoral college just ensures that all states have a say and are important in elections. At least in theory at any rate, and for the most part in practice as well. But not entirely.