This is true in most countries although not in Sweden for example. In most parliamentary democracies, the Prime Minister is the leader of the party that wins the most seats, not the leader of the party with the most votes. One of the reasons why this is done is to prevent urban areas from being able to dominate politics at the expense of rural areas, and to ensure more balanced input across regions of a country.
In the US, without an electoral college or some other vote smoothing system, California, Texas, Florida, New York, Illinois, Pennsylvania, and Ohio would be the only states that mattered. Presidential candidates would literally ignore the other 40+. The electoral college, while not a perfect antidote to this, helps ensure this is not the case.
Of course it's subject to its own problems--candidates generally ignore states that are heavily Democratic or heavily Republican and focus on "battleground" states, and a candidate who wins 50%+1 of a state takes all the EC votes while a candidate who wins 50%-1 of a state.
But in the end, the electoral college was an important part of getting states to join the US and ensuring the distribution of power required the entire country. The US has a number of interesting structural checks on the distribution of powers (the more populist seat distribution of the House versus the equal distribution of Senate seats being one interesting one, the circuit court system being another).
Hope this explains a little bit. Let me know if you have other questions or want perspectives from another non-US country