I know another country where the party who didn't win the majority of the national two party preferred vote can go on to win government and it's leader becomes the Prime Minister:
In 1998, the Kim Beazley led ALP, won 200,000 more of two party preferred vote (which is a similar portion of the Australian population at the time as 3 million is to the US population) , yet John Howard and the coalition formed government :
en.wikipedia.org
Same thing in 1990, albeit with a much smaller margin, where Peacock/coalition beat the incumbent Hawke government by 20,000 on a two party preferred basis, but Hawke formed government. Also happened in 1940, 1954, 1961 and 1969 where the party with lower proportion of national two party preferred vote was able to form government.
Parliament of Australia - Wikipedia
Every electoral system has its quirks, in the same way that in Australia, commentators focus on the polling in marginal electorates, in the US presidential elections the focus is on the swing states.