There are really about three tiers of employees for these purposes. Also, the reasons are a mix of legal and business considerations.
At the bottom, severance payments can be made in lieu of unemployment insurance claims being made by the laid off employees. Severance payments for workers at the very bottom are often modest.
At the top, "golden parachutes" are often written into the individually negotiated employment contracts of senior executives. Someone like a Steve Jobs will have negotiated a contract very favorable to him in the event of his termination with the board of directors when he is hired with attorneys on both sides heavily involved in its drafting.
In between, one of the reasons is to get a waiver of claims, for example, due to allegations of employment discrimination, harassment, and past work place related injuries that weren't properly processed through the worker's compensation system, and to reaffirm the existence of non-competition, non-solicitation, non-disclosure, non-disparagement, and assignment of intellectual property rights of the terminated employees.
Being able to "dot i's and cross t's" and definitively foreclose litigation from laid off employees also looks good to stockholders and prospective investors. If severance agreements cutting off liability and ruling out the possibility that sloppy paperwork could compromise the firm's intellectual property to be compromised by disgruntled former employees who no longer have a stake in the firm's well being were entered into, a larger layoff would often be followed by a stock price lag reflecting unknown contingent liabilities and intellectual property risks from former employees.
Closing off residual liability is particularly important in firms with stock or stock option compensation for a large group of employees and for firms with defined benefit pension plans.
But, it goes beyond that. There is also just a sense of moral obligation on the part of senior managers establishing the severance terms to good, loyal employees who are losing their jobs of often many years through no fault of their own. Most of those senior managers were once in the same position, worked with the employees who were laid off personally, and can related to their plight. In a publicly held firm, even for insider members of the board of directors, the shareholders are an impersonal abstraction, while the laid off employees are genuine people whom the executives implementing the plan know a sample of personally.
Of course, institutionally, this economy wide practice of big businesses also helps to fend off pressures from governments to impose bigger severance payment requirements as a matter of law. Substantial severance payments also discourage unionization by the employees who aren't laid off since it makes the employer look trustworthy despite not having its feet held to the fire by the law or a union.
Finally, it is a given that many of the laid off employees will land on their feet finding mid- to senior level jobs in the same industry or a related industry, or starting their own firms that may do business with the firm that laid them off, either as consultants providing institutional knowledge that was lost in the layoff to due carelessness, or as vendors or joint venture partners. A stingy severance package could sow ill will towards the former employer that could come back to bite that firm later, while a generous package will rarely leave significant ill will from the former employees who find new positions whom the firm will end up dealing with later on.