As far as I know this is standard at least in western Europe, I believe it is required by law, but it could also be defined in general contracts.
And it’s not just for the employer, it’s mostly for the worker since if you get fired, the employer needs a good reason (repeated or severe breach or contract) to immediately end the contract. So unless you fuck up severely, they still have to pay you for 3 months while you are looking for a job.
And in practice, most are aware that during this time period, they effectively can’t really control you all that much. Sure, if you just don’t show up for work at all or obviously breache the contract, they don’t have to pay you, but otherwise, what are they gonna do, fire you?
In some jobs you can essentially get 3 additional months of paid vacation if they don’t need you to teach the new guy or if they are scared that you could be a pain in the ass, so they just send you home while they pay you for 3 months.
I have seen it a few times, but there have to be severe and generally repeated offenses, though you can get fired instantly for stuff like serious stealing from the company. But then again, there was once a dude who tried to start a fist fight with his bosses’ boss, which apparently wasn’t enough for him to get fired instantly.