Even in countries with labor laws, people usually have a 3 to 6 months trial periods where they can be fired at will.
I think the true deterrent is not the law, but that it is rather expensive to train someone for 2 months then have to fire him/her, and find someone else.
In Germany, new employees typically have a trial period where they can be fired on short notice. Usually 3-6 months, depending on the wording of the contract. Dismissal protection only kicks in after the trial period.
In some countries, employment laws are so crazy, that it's almost impossible to fire someone willy nilly because they "suck". You have to give them written warnings, re-"skill" them, move them to different departments, etc. It's such a pain in the ass and then they still take you to court for unfair dismissal.