More generally, fired is used for anything specific to the individual, whether for cause (they were incompetent) or other reasons (the boss didn't like them). Laid off is for a departure due to company reasons (lack of demand for their product).
If you fire a 500 person team and intend to replace them with new people who do the same thing, it's not really a lay-off, but for legal purposes they probably have to treat it as a lay-off in terms of severance / unemployment compensation because I doubt they can document an actual cause for most of them.
Being laid off is also for cause, specifically the cause of "the executives need to juice the stock price".
For example, if you terminate an employee for coming to work late over and over, then the employee was clearly not meeting their expectations and they get terminated due to their own actions, hence they are not eligible for unemployment benefits. Because the state does not have to pay unemployment benefits, the state does not increase the amount of unemployment insurance premiums the employer has to pay.
If you terminate someone to improve cash flow, then the employee is not considered to be terminated due to the employee’s actions, and hence they would be eligible for unemployment benefits. Hence the employer’s unemployment insurance premium probably will go up.
Most people wouldn't say "Greg was laid off for pissing in the water cooler"