Isn’t it open discrimination?

So, My friend who recently completed his internship at a mid level company as a intern where he and his other team mates had 2 manager. First one is a male who had 4 years of experience as a developer and 2 year as a product manager and the other one is female who had roughly 1 years of product management experience and 2 years of experience as a developer. Both of them was nice to their interns but in case of choosing their favourite guide or trainer, almost all the had choosen the first one and roughly anyone had choosen the later trainer and their voting was crucial to determine who is going to be the next Team lead which is a much higher position. The trainer from all the way won the game but suddenly their principle engineer with CMO appears and declared that they are going to make the later trainer the next team lead for their team which left everyone shocked, even the woman herself. They explained that There are no woman working as a Team lead or as a C level executive on the board and they want to promote gender equality through that which was a offfensive moment for everyone who were attended there. So my question is,

1: Isn’t it open discrimination? Shouldn’t promotion and jobs should be based on the skill and the experience rather than gender?

2: Isn’t it toxic way to promote gender equality?

P:S: If the same situation had happened with a woman, I would have still said the same thing

Isn’t it open discrimination?