It depends. One of the reasons economists point to the youth employment/wage problem and non 'standard' contracts in countries with these laws are situations like this, as firing older bad performant employees is too expensive and hard. If I work in a company for 20 years, and I have 15 years to retirement, I can decide to spend my entire day browsing Facebook and most companies will have some difficulty firing me as they will probably have to pay between 3 and 5 years of wages and even risk a lawsuit like this.
My ex-mother-in-law had a factory, and when she caught an employee stealing (taking already made products home), she was fired on the spot, and after a year long battle, the court forced her to be re-admitted and paid lost wages. (our labour court is very very very pro employee to a stupid degree, but final decision was basically : 'she doesn't get paid enough and needed the money, so it isn't her fault')
I think there needs to be a balance. Firing an employee can't be so expensive that after a certain time an employee can do whatever they want and not face consequences, and employees should still have some financial and personal responsibility if they need to fire someone.