I understand your point - people can bring bad lawsuits for bad reasons anyways - but I'm not sure you got my point. If there's a special protected class that the process for laying off/firing is different from other people, then that might make you think twice about hiring someone from that. This won't make a difference for superstar people, and it won't make a difference for people in high demand. It only makes a difference for people at the margin - if there's two equally good candidates for a hard to measure role, and you're not sure if either of them will work out - wouldn't it be sensible to take the one that there's less chance of backlash for letting go if they don't work out?

Now, you could mention that's against the law too, and you'd be right. But I'll give you a real life example of how this happens. There's specific laws in California about doing what's called a "condo conversion", that is, turning a rental property into a condominium and selling it. There were quite a few condo conversions from 1998 to 2008 in California.

The law says the previous renter needs to get a payout - for people under age 55 or 60, the payout is something like $4000. For people over that age, the payout if $15,000 or so. (don't remember the exact numbers - just that the payout for people over a certain age was more than double)

Now, if you were renting an apartment and considering doing condo conversions in a year or two once you had more money, would you ever rent that apartment to an elderly person? No, you wouldn't. Not because you're a jerk. Not because you hate the elderly. But because, well, why would you want to pay $15,000 to someone to leave an apartment after renting it for 10 months? Hell, they might pay less rent than $15,000 in the 10 months! You'd be better off leaving it unrented!

And mind you, this is a legally protected right, the landlord can't even explain, "I'm thinking of doing a condo conversion, I'm happy to rent to you, but if you want this can you waive the mandatory payment? If not I might wind up giving you more money than you pay me in rent." That's not possible, this payment is a non-waiveable right in California.

That law is to protect elderly people, thinking it's harder for them to move. But a result is that it's harder for them to rent in high transition areas. Okay, make a law prohibiting that too, but if someone gets five candidates for an apartment they're considering a condo conversion on, they don't want to rent to someone that they're going to have to pay more money to than they receive in rent. Hence, less housing de facto available for the elderly as a result of the de jure anti-discrimation law.

So you might be doing more harm than good.

> If we imagine a universe where age isn't a protected class, your professor's secretary would cause just as much trouble

She wasn't a secretary, she was either an electrical engineer or a coder in assembly language. They were making systems to transfer energy to different power grids efficiently at a crowded train station back when he worked in industry. I do think it's funny you just assumed she was a secretary though when I just said my professor of technology hired a female minority who interviewed well with good credentials, but turned out to be bad at her job. Even in academia she could've been a researcher or lab technician or administrator.