What is a problem is if you use that to justify discrimination. Just because members of a demographic are statistically different, it isn’t okay to treat individuals differently because they belong to a certain demographic. And that’s what people are complaining about!
People don’t complain when you say: “A lot of the fastest marathon runners are from Kenia”. People will complain if you use that fact to justify an imbalance in your workforce: “Well, it’s obvious that we hire only people from Kenia since marathons show they are much faster!”
So why do companies fire people who say stuff like that? Because discrimination is stupid from a business point of view: variance within demographics is much larger than variance of the mean between demographics. So if you hire people based on them being part of a “good” demographic, you will end up with worse hires than if you actually selected for individual aptitude.