1. Microsoft does not make decisions (mostly) based on fairness to prospective employees. It DOES make decisions based on having a good public image, part of which is being seen as diverse and inclusive.
2. The reason being diverse and inclusive is seen as good is because of a ton of research showing that being diverse is good for companies, good for employees, and good for entire underrepresented communities.
So it's not fine, but the fineness or not does not exist in a vacuum. The two situations are not arbitrary, and therefore, not analogous.