Obviously, I don't know the specifics of the OPs situation, but there's more than qualifications, which the OP is comparing to tenure. Companies need to promote people that can backfill leadership positions over time. By that I mean, execs/hiring managers may think of every promotion as a potential Dir and above. If you're 55 and a tech or analyst, they could promote you every other year and you'll be retired before you get to where they need you to be (and they'll have wasted money developing you whereas they could have been developing someone else)... and that's the reason younger/less tenured candidates are being promoted before you.
To further clarify, to be CEO of a large corporation, you probably need to be a Director by ~30, VP by ~37-45, SVP by ~45-52 and EVP by ~55. And I'd say if you're not Dir by ~55, you won't be one. So, as an example, if the OP is 50 and the less tenured candidate is 33 and they both have potential for Dir, the less tenured candidate should get the job because they have a longer potential runway for advancement and would be more valuable (higher Present Value) to the company.
All that said, the real issue we have is primarily older, more tenured/experienced/qualified candidates (or oversees resources) taking entry and mid-level US jobs from recent grads and younger people (and thereby forcing them into service jobs) simply because the older person (and ideal candidate) was RIFed and is now willing to work for less money/title.
As a hiring manager, I'm always going to hire the most qualified candidate. I recognize that seems like a contradiction from my initial statement, but it's not because companies, execs and hiring managers constantly balance short and long term goals, but they're not necessarily sharing the strategy with everyone, which is why it can be a bit confusing/frustrating.
And now for a piece of advice - don't mention tenure in an interview. Highlight specific examples of what qualifies you for the job, have a solid career plan beyond getting the immediate job, have a vision of what you personally could bring to the team and be passionate. Tenure is like saying you know how to fix a VCR - who cares.