If you quit (because of, say, RTO) then you quit. It's a fairly standard deal between you and your employer.
If you get laid-off, employer has to give you a severance package for any number of reasons (local labor laws, agreement with the union, corporate PR). This is not a standard deal and is, simply put, more expensive than if the employee just quit of their own accord.
In both cases, employer gets the benefit of reduced head count.