Yes. I got rejected, and then a couple months later they figured out that the role they were trying to fill wasn't actually what they were looking for. I was hired, stayed for 4 years, and built out the team. It was a success.
For what it's worth, I have hired people this way in the past.
I know multiple people who keep a "good candidates" file of some sort.
Agree sometimes it may be meaningless boilerplate.
It actually worked for me. I applied for a position a while ago, no interview. Then one year later a recruiter from the company reached out to me saying I should apply for a new position. So I did, and I got an internship that way!
I've had scenarios where one candidate ticks all the boxes and we hire them, and we have another great candidate who was earlier in the hiring funnel that I stay in touch with even if we don't have an open requisition at the time. I've gone on to hire folks months later if they're still open to looking at opportunities.
It's objectively not a small company, but that's actually how I got the job at Apple. I had applied to a job, gotten rejected, but my resume had "Clojure" on it which was triggered for a search about a year later.
I've been on the other side where as the hiring manager, I've had recruiting contact prior candidates. Sometimes there legitimately are more high-quality candidates than open roles at a given time.
Our company hired someone that they interviewed and initially rejected. The developer wasn't a good fit for the initial role, but then a maintenance role opened up about six months later.
For my current job, I almost had an issue during the interview process because the recruiter had my old resume that was still in the system from the first time I was referred three years ago.
I applied to some internships to 2 huge consulting firms everyone knows, got denied, and I wasn’t able to fill out able to apply to full time roles with the same email address a year later