There should not be any restriction on a company's right to terminate an employee's employment. Any restrictions should be governed by the specific contract of employment.
If a company no longer has a need for an employee or feels that the employee is no longer worth employing then they should be allowed to react appropriately.
It would make employing someone more appealing to a company, enable them to employ the people they think are most suitable to their company and reward hard working employees while making it easier to get rid of those who, for whatever reason, are not appropriate for the employer.