Except it often does. I've been in multiple situations where people who knew less then me were more senior, simply because they had been around longer.
A better measure might often be time-at-the-company. I'm older than some of my coworkers, but they wrote 3/4 of the codebase I work in. Commits seem like a good proxy for knowledge.
You could also graph commits over time in particular repos/apps/folders, and see who is has been the main maintainer/developer for those sections of the codebase at various times. Cool stuff!
Yes it does. Is it causal, no, but it certainly correlates.