That said, if you're a lowly paid shit kicker that would seem wrong as typically a new junior job they want to to start ASAP and wouldn't wait for 3 months. So that could hurt your ability to find new work.
But yes I suspect that's part of why they have such a long notice period - when I've spoken to recruiters / hiring managers elsewhere they're interested right until the point where they discover I have a three month notice period.
If they won't change, quit on the spot. Then you've got 3 months to find a job.
Edit: Added the pitch it as.
A company can certainly ask you to give more notice, but you are under no obligation to do so.
In practice: a pretty rare situation, and not a meaningful deterrent to quitting at will.
I believe the cases where you're meaningfully prevented from quitting without giving notice, generally, are cases where you already know clearly that you can't, and why you can't, because you negotiated your contract and know what you'd be giving up to leave. There are key-person agreements that get signed in acquisitions that have that kind of effect.
Employees, though? Not so much. Employers in the US that purport to require notice from rank and file are pretty much generally full of shit.
(Not a lawyer, have just seen a lot of weird employment situations).
† Signing bonus claw-backs are also super common outside of "notice" situations, so it's not like that's an exotic case; if you have a signing or retention bonus, you probably already know you have a contract requiring you to return it if you leave within N months.
The vast majority of employees in the U.S. fall into this category, and are free to leave their jobs at any time - and their companies are free to fire them at any time. Under this system, giving notice of your resignation is a courtesy, not a legal obligation.