It may or may not be legal but it opens the corporation up to stockholder lawsuits. Once a corporation begins hiring on criteria unrelated to maximizing stockholder income they've gone down a path that will bring down management.
DEI initiatives harm corporations long-term and will always ultimately fail because the corporation is no longer maximizing profits. This is not a new idea: IIRC even Adam Smith had something to say about such kind of activity.
Yes in theory, no in practice. Such lawsuits are incredibly rare, and this sort of thing is often done with the explicit acquiescence of the board anyway! And in many places they just change the law to explicitly make it legal, like in the UK, where they passed an Equality Act actually makes discrimination legal.
Yes it harms corporations in both long and short term but the people who do it don't care, because their moral code states that corporate harm either isn't real or is actually a good thing. You can't win when arguing with someone's fundamental moral code.
DEI initiatives harm corporations long-term and will always ultimately fail because the corporation is no longer maximizing profits. This is not a new idea: IIRC even Adam Smith had something to say about such kind of activity.