Fun trivia: The rule that permits an over-the-fence home run to have all the runs count even if they aren't always needed wasn't always the rule. Prior to 1920, the game ended as soon as the go-ahead run scored (and the hits were "downgraded" from home run to, presumably, whatever they were based on the rule others have discussed here for inside-the-park walk-off hits).
If not for the pre-1920 rule that ended games immediately, Babe Ruth would actually have 715 home runs (and only 135 triples).
If not for the pre-1920 rule that ended games immediately, Babe Ruth would actually have 715 home runs (and only 135 triples).