In most other countries you cannot fire people just for reasons like this.
In other countries people have to resort to backhanded ways like the parent comment mentioned if you want to get someone off the payroll.
If after several months you decide you no longer want them that's different, but if you hire someone, they're no good, you can fire them pretty easily, assuming you've specified the probationary period in the contract.
(country specific)
I agree, but a lot of things that are not allowed but happen frequently.
Doesnt matter what the law says is illegal, unless its enforced.
Im not saying its a good thing to resort to such toxic measures.
Parent comment said it is evil and should not be done, I just mentioned the reality that in most countries its one of the classical tried and tested method to bypass employment safety laws that almost rarely gets backlash.
I myself dislike such toxic behaviour, but just stating the reality of what happens.