Can employers use language to gatekeep people from different racial backgrounds?

Hi, I've been seeing a lot of jobs with a mandatory bilingual requirement for Mandarin. I'm familiar with Spanish as a preference but usually it's not mandatory. Can employers use such tactics to ensure only people from a preferred demographic get these jobs? I live in NYC and although we have an Asian community, it's not the biggest so businesses can't sustain with just Asian folks. But asian owned businesses do get a lot of Asian clients, so I could be wrong about this. Want to hear opinions both contradictory and in favor.