If you're a publicly traded company you have a duty to make as much money for your shareholders as possible. Hiring based on metrics like skin color or sexual orientation doesn't do that and arguably does the opposite.
Why the people running these companies haven't been sued by shareholders I can only imagine is because of the fear of appearing racist. I wonder if those of us owning mutual funds that have shares in these companies would have standing.
I only hire on merit. However, I find people of merit in all skin colors so, I hire them. Just looking for merit will give you diversity. No one color has a corner on the market