Beyond banning them de-jure you've also got to ban them de-facto.
"We all know non-competes are unenforceable and illegal." There are no consequences for forcing someone to have the stress, expense, time and to secure the financing so that if everything works as it should (which it often doesn't in all the various legal systems) you get only some of that back. If it doesn't work as it should you're toast. Not a nice thing to be hit with when the law is clearly designed that you should not be hit with anything at all.
For an individual or a startup it matters. For a large revenue incumbant they have people employed to abuse the system like that and the business expense of doing it is trivial, more than worth it. The law may exist so that the strongest do not always get their way - but this is an ideal with many exceptions including this one.
Ban away, but with no consequences for abuse and all measurements for the abused being the magnitude of the downside alone, no upside possible you don't get the result you're looking for.
Summary dismissal with costs, compensation and the potential to be branded a vexatious litigant so it is more difficult to bring any court action against anyone would be a real consequence for abusing the rules. Is the best one? Is it fair? Dunno. What we have now in most countries sure isn't.