Placing always depends on who shows up at a given race, your sprint, the Olympics, whatever. You got first in your age group and it sounds like your swim turned the tide.
Of course, that doesn't take into account the epic BEAR PUSHING THE OTHER GUY DOWN sprint that would have taken place in the finisher's chute had you two been .6 seconds apart.