Per your comment on @Mister Positive's answer:
On your last sentence: if you mean that a candidate can be considered for other positions, unfortunately here is not possible. When I interview a candidate, this is for that position and that position ONLY. I personally interview 3 times in a month a candidate for 3 different positions and a candidate was interviewed 5 times in 2 weeks by 5 different team leaders for the same role but in different teams (for the record this candidate war rejected by 3 team leaders and promoted by 2...)
and your edit #2:
I spoke with HR people (even with HR main director) countless times about this problem, but they repeat that "Our policy is to do interviews that are already scheduled in the following 2 days after the position has become unavailable".
and parts of your original question such as:
position no longer available, position already filled, people already rejected by a different interviewer in the hiring process, budget no longer available, etc.
and one of your other comments to another answer:
HR may know for 2 days already that the interview is useless, sometimes at least call me some time before, sometimes they tell even to me a few minutes before starting the interview.
It sounds like you are describing a different situation than simply that the candidate will be rejected, but rather that the position is already closed.
If the position actually is already closed and you have no options to hire the person being interviewed whatsoever
I think you might want to consider that you, by following company policy, are possibly being a party to engaging in what very well might be a form of employment fraud. You are having "candidates" who are no longer even actually candidates for a position spend time and possibly other resources to come to interview for a position which they are not being considered for and/or which does not exist. The fact that you know there is not a position or it is one that they will not be even considered for means that you are knowingly interviewing them under false pretenses, unless that is what they were told.
This is distinctly different from simply generally "knowing" a candidate will likely be rejected.
I've interviewed plenty of relatively long shot candidates because there was a lack of clarity that I needed an actual interview to determine if they had "just enough" or not to make the position, particularly when dealing with sparse candidate pools. But that's a very different context than what you seem to be describing.
If you truly cannot change policy (see other answers), cannot simply notify candidates anyway (see other answers), and have no options to hire interviewees no matter their qualifications (see other answers)
You should definitely be sure you are getting this all in writing and with explicit and direct clarifications (on topics such as "wait, the position is closed, I can't hire them for anything else, but you're telling me I can't tell them that the position is already closed and instead must pretend to give them a legitimate interview?").
You definitely want to be sure you are talking to the right person in HR, and not just getting the same response from someone who doesn't actually know themselves what the proper procedure is.
You may want to consult a lawyer, if this is really top down and solidly followed like you've described.
You should also probably look for a way out as fast as possible if that's the case (start looking for another job).
You could certainly try pushing this back upward, but you've been fairly adamant in that not being a realistic option.
If you're feeling ethical, you may want to talk to your labor board (state labor board if in the United States) as a whistle blower, but you might want to talk to a lawyer first, and you should definitely consider that regardless of whistle blower protection laws, you'll want to be looking for work elsewhere.
I'm not a lawyer and I'm not qualified, particularly given the somewhat less than perfectly clear descriptions you've given, to offer any clarity on how likely or not what you are describing could possibly truly be a matter of legal fraud, particularly in whatever jurisdiction/country you may reside in. But the situation you are describing sets off numerous alarm bells for me and meets many of the qualifiers of prima facie fraud under a common law definition of the term, where one party through factual misrepresentation causes injury to another through their actions relying on the veracity of what was represented.
I can tell you, at least from my own related training and coursework, that your HR is failing to follow related industry standard best practices in hiring procedures, not only by engaging in interviews without an available position, but also in clearly (due to how you're describing this situation arising in the first place) not following any best practices in structuring how interviews and the selection process flow in terms of creating as objective as possible of a selection process and in terms of employing standard bias reduction measures that are part of that structure.
The fact that they are having these interviews go forward after closing the position speaks to the possibility that internally they have policies that a certain number of candidates must be interviewed for a position, and thus they think this hews to those policies as a "workaround" of sorts. It does not hew to the legal reasons underlying those types of policies and in fact any challenge on a related basis for those policies would find the behavior to instead speak to a knowing attempt to cover up problem hiring behavior through these lip service actions, even ignoring the arguable harm to these interviewees in having them appear for an already closed or non-existent position.
It's arguable that they were not yet promised a position, so they have not lost anything. At the same time, they were effectively promised to be fairly considered for a position, and there is case law regarding employer behavior where certain employees were not given any or equal consideration in the hiring process without having yet been promised employment (such as in cases of racial discrimination during hiring, etc). Given that there is no way that a premise of fair consideration could be upheld, but it was represented that they would be given it, I, at least, would not be comfortable of my standing in being a party to what you seem to be describing, either ethically or legally. Even if I was going to continue in terms of my personal ethical rubric (such as feeling troubled but that it wasn't worth switching jobs over), I would want rock solid legal clarification from a third party (my own attorney, not HR or the corporation's own counsel, assuming the latter exists or is even aware of this policy).
Personal Perspective
If I were in your situation as I understand it to be I would unequivocally find a qualified corporate employment lawyer to consult, as a first step. I would also make sure I had a very strong trail of very explicit written instructions and related explicit and direct clarifications (see farther above) from HR on this policy requiring holding interviews for closed/non-existent positions. I would record related emails in a way that I could independently retrieve if they were pulled/deleted centrally (probably by printing, depending on the backend system).
Depending on the company I worked for, I would consider pushing this up chain towards both legal and upper management and/or HR management as a question of related law and ethics (see other answers for plenty of additional cogent arguments about the harm involved both to interviewees and to the company as a matter of wasted resources), but I would only do so in a highly documented way and, again, probably only after at the very least consulting a third party lawyer to gain a firm legal perspective. I'd still make sure I had an available exit strategy planned and could afford to potentially end up out of work for a period of time if things went terribly wrong.
If there was no legal standing to challenge this internally as a matter of legal jeopardy and/or bring it before a state labor board, and I could achieve no traction through internal campaigning to change this practice on a basis of ethical abuse, I would simply find another job in any case. That's based on my own sense of ethics, personally, if nothing else. I'd also happily document the process and the issues on any related sites as a warning to anyone seeking employment with that company: to a degree you have to consider whether this can affect your future employment if uncovered and how far you want to take it (for example, submitting anonymous reviews versus going so far as talking to local news agencies about it).
Ultimately, you do you. Quitting a job over an ethical shortfall on the company's part is a relatively personal choice. From what has been described, though, the situation is clearly unethical. Personally it's something I've done before over other situations, something I've also failed to do over other situations in different circumstances and ultimately regretted, and something where I've chosen to avoid otherwise advantageous jobs over ethical issues related to the employer. That's me. You'll need to make your own choices.
Legal/Social Context Note
Note that this answer is coming from a perspective of employment laws in the United States. In other countries where certain practices that are quite illegal in the US are common and either legal or ignored, this answer may not be relevant, and while I'd like to think the ethical side still stands, practically if all other employers in the area engage in this it might have to be something that is instead continued to the best of your ability to make it marginally more ethical at least.