I do not know much about laws. After working some years at an organization, asked to leave without stating any reason can be painful, traumatic to the employee. Employee can be alone with dependents and all of a sudden his/her world can be crashed.
Basic human courtesy can be to let the employee clearly know why he/she is asked to leave. At least, after knowing the reasons, he/she may change his behavior in future employment. If reasons are not known, employee can never know in reality what mistake is made/highlighted/led to this drastic decision and some times that act may be accidental or any politics by some other person ...etc. Since the employee says " by not stating a reason. It's also really hard to work through in your mind." i.e. he/she is still clueless on what exactly happened.
1. Is it not fair/humane to give employee a chance to hear charges and to tell his/her side of story so that independent body can decide fairly?
2. Reasons given by CEO such as incompetence,inappropriate comments,not taking feedback by managers may or may not be true in reality since proofs are not provided. Software development is a team work. So some times, mistakes of others can create burden on other and management may not aware of real culprit. Feedback is tricky aspect. I noticed management sometimes can be highly opinionated without real understanding of complexity of work/problems/issues, solutions tried ...etc. Managers just for their bonuses/promotions or to appear good in front of their bosses, act as intelligent or knowledgeable, though in reality they can be novices in many aspects. So if feedback is irrelevant or if feedback lacks common sense or lacks domain knowledge ...etc, then how employee can accept it?
We do not know many specifics about the incident and we do not have proofs So we clearly cannot point out who is wrong but employee should have been given a hearing by independent group on the charges so that he can defend and if that independent group do not agree, then they can ask him/her to leave.
Even in courts, where death sentence can be given, charges will be told and accused can provide his story/point of view on what happened and then court passes judgment. Then why similar facility cannot be provided to employee rather than throwing out like used tissue paper? It does not sound humane at all.