If there were 10 events and a team won silver and bronze in all 10, but no golds and another team won 1 gold, but no other medals. Which team do you think had the better games? If gold medal ranking was more logical, then it would be the team with the single medal in one event. Not sure how that's more logical.
Conversely, if a team won the gold in all 10 events and another team won the silver and bronze in all 10 events, which team had the better games? If total medal ranking was more loical, then it wouldn't be the team that won every event. Not sure how that's more logical.
Both swimming and track have team national championships and those championships are not determined by which team won the most races; they have a score distirbution in which first place is worth the most points, second the second most, and so on. With the Olympis only awarding 1st, 2nd, and 3rd, one would think 1st should be worth more than 2nd and 3rd combined.
But it gets even more complicated. As many have pointed out, the Olympics hands out as many medals for diving as they do for basketball, volleyball, water polo, and futball combined. Is diving really worth 4 times more than any of those other sports? Or do you do a NACDA Directors' Cup ranking where you equalize across all fields?
There really isn't a way to logically weight medal count because there's no "winner" of the Olympics; only winners of individual events. But if you're going to rank the medal count then both total golds and total medals should be used. To what degree makes for fun arguments.