My question is, are these statements simply a formality or do prospective employers really do get back to rejected applicants when a suitable position opens up?
The only way to answer this question is, "it depends."
There are clearly employers out there who say all kinds of things to rejected candidates as mere dismissive pleasantries. But, there are also cases where sentences like these are said with 100% honesty:
Perhaps I can check with other departments to see if there is a more suitable position for you.
We will keep you in file and let you know if anything changes.
Sometimes the follow up is done actively, other times it's a passive function of the employer's HRIS or recruiting system.
- Active follow up: At my current employer, a different hiring manager had a candidate apply who was overqualified for her position, technically speaking - and would have been a better fit for my team. She emailed me a link to his application. I didn't have a position open then but bookmarked it, and when I had a position open up a few weeks later, I had our recruiter reach back out to the candidate. He applied, interviewed, and is starting with me in two weeks. An important distinction here is that the rejection from the original position was due to skill set, not overall "fit" - otherwise, of course, she wouldn't have referred the candidate to me.
- Passive follow up: At a prior employer, we had an HRIS system that maintained a record of every candidate and the positions they'd applied for. These systems are fairly common, at least among larger or more sophisticated employers. Any time I had a new position in my department posted, the system automatically scanned past applicants and suggested candidates who might be a good fit, based on an algorithm of key words versus the age of the application. We often had our recruiter reach back out to past applicants to see if they were interested in the new position. Even if none of these people were interested, seeing a pool of candidates was a big help in terms of understanding the labor market.
Skilled internal recruiters understand that it is their responsibility to manage the employer's connection with the labor market, and a huge part of that job is maintaining knowledge of candidates. Employers who say these sentences with the intention of actually following up will generally have a leg up on the competition that's using them dismissively.
To get back to your question: If you're asking about a specific employer's response, none of us can know that. If you're asking about policy in general then yes, some employers absolutely do maintain applicant pools of "rejected" applicants and reach back out to them.