Back when H1B visas were new. Companies would post jobs they did not want to fill. The posting was to provide evidence that they could not find anyone who could do that job. Personally I have seen so many Microsoft listed jobs, that it seems impossible that they could have a layoff, unless of course ....
This can still happen a lot for normal job roles.
I have a candidate that I want to hire (say a recommendation, a referral, or someone I just want to give a job to) my internal processes may mandate that the job needs to be “advertised”.
So it gets advertised - and what do you know - the only applicant that fits the bill is this one person…