A lot of things could cause one to be retrenched even though there is contract agreement between the two parties. The company could easily be going through a recession without even the attention of the management and not even the CEOs themselves.
Many companies only find out after the accountants get involved and warn the management that there is no future to the company from what they see. Accountants easily determine whether the company is doing well or busy sinking like a titanic and this they tell by looking at the past turnover, the frequency gives them determination to the next few years.
This could easily put your job at risk even though you have a permanent contract with the company, but if it is sinking the there is no other way but to close down.