But for it to be a multi-year process, it has to be an exceptional situation. Often involving court battles, unions, etc... In practice, most employees don't want to stay in a company where they are unwanted, they may try to negotiate a bonus but rarely fight to the bitter end. But sometimes, it happens, and it is one of the things small employers fear the most.
Getting fired can actually be a good deal for the employee because he will get unemployment benefits after that, whereas if you quit, you won't.
But generally, you are right by saying that in France having an employee is a big commitment for a company, plus, large companies often have unions.