These decisions are made by middle management, who are free to indulge their prejudices, regardless of a calculation of what's best for the corporate bottom line.
Without thinking about what's best for the corporate bottom line, the middle management will take decisions that are bad for the company.