I have had two jobs in the past posting inside the department that 2 or 3 people had to waste their time interviewing for with zero chance just as a matter of policy. The manager had to interview x number of people in the name of fairness or something like that.
Yes, and that is a BS posting.
Is this just some hr compliance so they can search outwards?
One other thing I've seen (many times) is to pacify an over-worked team: the team is working crazy over hours, demotivated, asking for help. The manager knows is impossible to hire (head count / budget limits) and so they open a Job Offer, where they can show "we are searching for help, but nobody comes". How do I know? once I was in such over exploited team, so each of the team made a fake resume that was, of course, like a glove for the position. Nobody got a call back. When we confronted the manager, he had to confess. [in case somebody asks himself, 6 months later the whole team was gone]. Then same company, I applied for a job, where my resume was really perfect for the position. As I received the canned response, I called the manager, pressed a little bit, and also said "we had to do as we are searching, but we are really not".
Yet another one I know of, because of reasons: HR consulting companies and also some HR departments want to test if they are paying too much/too little, want to have some "market measurement". They fake jobs, fake interviews, and they would inconspicuously ask "how much are you earning now" and/or "how much do you want to earn" and that is all they want from you really.