Why don't profitable firms use previous profits to offset current loss It is being reported that EasyJet expects a heavy loss in the current year due to Covid-19 pandemic. The report states that

The airline said it expected to sink into a pre-tax loss of between
£815m and £845m in the current financial year, which is worse than
analysts' forecasts of a £794m loss. It would be the first time in
EasyJet's 25-year history it has not made an annual profit.

The report also says that EasyJet has laid off more than 4000 people and has taken a government loan.
I looked at their profit profile and it looks like they have made more than 300 Million pounds profit for last many years.
Why can't they offset the loss (caused by special case) from their earlier profits rather than resort to drastic job cuts and government bailout?
The primary goal of most companies is to make money for its shareholders. They put money in, and they expect to either get dividends, or be able to resell their shares for a higher amount. It's the shareholders who own the company, and they are the ones deciding. And they want money. Otherwise they would give their money to charity.
So when a company makes a profit, they will do a combination of one or more of these:

Set aside some as reserves (in some cases there are mandatory reserves by law)
Re-invest some of the profit to make more money in the future (buy new equipment, buy companies, hire people, send money on R&amp;D...)
Pay dividends to shareholders, or buy back shares (two ways of giving money back to shareholders)
And the rest will remain as cash.

Investors usually don't want the company to hoard profits. A safe reserve so it can go through difficulties, but that's it. Cash in the bank makes very little money, it's not a useful use of those funds for the investor: they'd rather get the money and invest it themselves according to their own risk profile.
If the company doesn't do what the investors want, then the shareholders will usually change management to make sure it complies.
So keeping employees on the payroll in tough times is not a primary goal of most companies. Of course, it's not a good idea to fire everybody at the first sign of trouble (it has an impact on the morale and performance of the other employees, it may cost a lot in severance, and when business picks up it will take time and cost money to hire and train new people), but if things are too bad, then it's the only option the company has to fulfil its obligation to shareholders.
There may be exceptions: a company and its shareholders may decide that their social responsibility is more important than making money. Cue all the &quot;fair&quot;, &quot;equitable&quot;, &quot;social&quot;, &quot;responsible&quot;, etc. keywords. But those are really the exception rather than the norm, and there's a limit to what can be done. Even if it made profits consistently and kept those as reserves, those reserves can't last forever while the company is burning through cash.
Remember that many companies have very small profits compared to the revenue and costs.
Consider a company with usual revenue of 1 billion pounds, but with tight margins: their expenses could be 900 million pounds, so the profit is 100 million pounds. They keep the profit year after year for 5 years, so they now have 500 million pounds in the bank, and the shareholders haven't complained yet (as if).
Now Covid strikes, and the revenue dwindles to 100 million pounds. If they keep all their costs the same, they're haemorrhaging 800 million pounds a year. They won't last a year like that! So yes, they will have to reduce costs, and part of this is laying off staff.
Don't think those figures are realistic? In 2019, Easyjet has revenue of about 6.385 billion pounds, but expenses of over 6 billion pounds! With revenue slashed to a fraction of what it was, they obviously can't keep spending like they did. They would have needed to keep profits of the last 20 years just to be able to get through this year.