YC explicitly says they're looking for the best founders, not necessarily the best idea.
In other words they're rejecting you, not your idea.
(See also: college, job offers, consulting engagements, and -- took me decades to learn this -- dating.)
That said, I do think it's worth noting that the pleasant fiction of "it was the idea, not us" is patently false for YC.
A healthier (and more accurate) way to think of it would be to say that they're rejecting their perception of the team, rather than the team itself.
YC explicitly says they're looking for the best founders, not necessarily the best idea.
In other words they're rejecting you, not your idea.