That happened to me in my last job, at a liberal non-profit. They only wanted blacks for promotions, and kicked them up to higher management even if they couldn’t do the job. The professional staff under them had to do their work for them, without the pay or recognition that came with the higher job. What happened is that there was a constant revolving door of white staff supporting black directors, who left because they were fed up covering for an incompetent boss without being paid for it.
To be fair to the woman they promoted, against my advice, the real problem was not the job itself, but dealing with the unrealistic expectations of upper management.
Eventually they reduced the scope of the job, from 30ish staff down to 8ish, and found a black woman that could handle that.
But yes, it was a huge injustice for the white staff who never got considered at all.