The difference is that with an illegal contract, your future employer might actually believe it's more headache than it's worth to fight. I would err on the side of casually striking it out of the employment contract, simply saying "this part of the standard document doesn't apply in our state" etc.
On the other hand, a court can't really order you to work for the company, so even if by some miracle they were successful, it'd come down to a matter of damages, and those would be difficult to prove even if you went to work for a direct competitor.
By the way, the Silicon Valley HBO show can be remarkably accurate on things. It's rare that a TV show gets things like this right, where people in the business don't.
I just happen to know lots of attorneys in the space. I am not an attorney or giving legal advice. Talk to your attorney for that.
I'll sign whatever illegal documents you want me to sign, knowning that they don't matter.
You might respond by saying something like "what if they go after you anyway, even though it is unenforceable.".
But the problem is that they could just do that anyway, illegal contract or not.