I replied to another poster about the collection of ethnic minority data in the UK. I repeat what I said previously: these stats are collected in order to provide insights into important issues such as health, employment, housing and yes, inequality.
For example, the COVID-19 pandemic has revealed that deaths from COVID-19 are higher among black and South Asian groups. Without this data we would not have been able to identify that these communities are at higher risk.
Link to my previous comment on this thread: https://news.ycombinator.com/item?id=25891543