In India, a few years ago some of the bigger companies started this trend of making the notice period 3 months so the employees can't leave. The same companies don't want to hire someone if they can't join immediately or within 30 days.
I've been interviewing and cleared all the rounds but those companies have put my profile on hold and keeping me as a back up in case they can't find someone to join them sooner. I also receive far less calls than someone with 30 or 60 days notice period. It has left me with no option to quit my job without having another job lined up to escape my toxic, abusive boss.
3 months notice period is ridiculous and there needs to be a law to stop this and prevent companies from exploiting employees and not allowing them to leave.