So if it was clear on his resume/communication that he had less than 2 years experience, the "we require 2 years" is an excuse, not the real reason.
If the recruiter knew he lacked the experience, and if the experience was a hard, unyielding barrier, then the recruiter would not even bother.
We've all met people who have those skills with much less experience - and we'd hire them. Yes it's an excuse in a way to say then that this is why you weren't hired. Not a lie as such though - just the "reason".
If we started communicating to people that they're not good enough for the job, maybe we would have fewer people running around complaining about how unfair everything is.
That's the thing, If I don't hire you, well, I can tell you the real reason, sure, and I feel a lot better because I'm being honest and transparent. Real reasons, for me, include the following
1. I planned poorly or business conditions changed, and it turns out there isn't actually enough money to hire someone.
2. I don't believe you are smart enough/ capable of learning what I will have to teach you to do the job.
3. I don't believe you are trustworthy enough. Most of the jobs I have, well, involve the ability to destroy me completely. (which is a problem, yes... but it's not an uncommon problem, for sysadmin jobs.)
Upon hearing either of those reasons, it's perfectly natural for the applicant to be angry and/or defensive. 1. is quite clearly my own fault; I'm wasting the applicants time through my incompetence, so obviously, that's going to be irritating. 2. is where my feedback could actually help the applicant, maybe? but even there, it's hard. It's hard to be told you aren't good enough, and many people react badly on that level... and sometimes their defensiveness is justified; evaluating people is hard and even really good hiring managers are quite often wrong. Hell, different hiring managers look for different things; One guy says to act more confident and take control of the situation; the other says the opposite. These decisions are often made on 'gut' (which is another issue... but it is what it is) and sometimes, well, the hiring manager does not understand him/herself what is going on.
This is before any of the legal bullshit.
I don't think you are good enough for this job
vs.
You are not good enough for this job.
The former is a decision that I (and anyone with hiring authority) is qualified to make; the latter is not.
Hiring is hard and most people aren't very good at it, so the opinion of one hiring manager (while being a valid reason for the hiring decision that manager makes) does not mean you are actually unqualified.