Not every programmer with some years of experience is better than a recent grad at doing certain things. A new grad from a top school can fire on all cylinders with some training. Having more years of experience does not confirm that a person requires less or no training, however.
Yet we state in job requirements "5 years experience with ____" with a sweeping generalization for everyone that has worked with ____ 5 years. People are held to different standards based on number of years of work rather than their accomplishments. That's some flawed reasoning. There is no standard consensus to measure some aptitude for any given length of experience. Experience is only a measure of time quantity. But quality and accomplishments are what matter.
So why are many companies grouping applicants by years of experience, and not by quality?
The only forward answer that I have gotten was "because it's easy, and a measure (but not THE measure)". I don't find this answer satisfactory. It almost defends a lack of investing more time or effort to find better ways to filter applicants for desired aptitude.