The fact of the matter is, most employers aren’t naive and have always found legal proxy rationales to discriminate and prevent hiring or fire someone. If an employer doesn’t want to hire you or wants to fire you, they’ll find a way. That doesn’t mean these sorts of laws are entirely useless. Some employers are pretty stupid and through emotion vent out the real intentions in a recorded fashion, so these sorts of protections help there.
They also curb some of the language businesses choose to use, making them at least appear a little more professional, for example in this thread, by not calling their white workers “retarded” (not aware of this happening but it seems reasonable). They may think it, but they need to say “our current staff are inefficient” or something else of that nature. I like not being insulted based on my race, age, sex, orientation, etc. it sets some guidelines, even if you might detest me for those reasons I at least don’t have to listen to it daily. Now legally in many cases some might have to.