This wouldn't be able to happen in EU as well. Previous employer can't force you to not being able to offer your services in the job market. They can pay you instead.
It's usually unwise to speak in general terms about the EU. It's 27 different legal systems, after all. For instance, in the Netherlands non-compete clauses are enforceable, though with some restrictions [1].
They mostly can't in the US either. And Amazon has apparently rarely prevailed in enforcing it. But that doesn't prevent them using lawsuits as a kudgel to punish defectors.
Please elaborate, here in Sweden a NCA is only enforceable if the company is willing to pay up to 60% of the full salary to keep the non-compete, limited to 18 months maximum.
in the UK for example, which is still sort of in the EU during the transition period, a non-compete IS enforceable as long as it is reasonable and proportionate.
Overly long time periods or overly broad geography will get it struck out, but 6 months not working for a direct competitor is usually going to be fair game.