If we were to ask companies to pay tax on all earnings, there may be some undesirable knock-on effects. Most new businesses are not profitable in their startup phase. Is it desirable to tax them, making the startup process harder, when 50% of them fail within the first 4 years?
Most of these companies are contributing in other ways, such as by employing staff, selling products on which VAT applies, paying NI contributions for their staff, etc.
Just because they are not paying tax on their non-existent earnings does not mean they are paying no tax at all. It may be a small proportion in comparison but it is a drop in the ocean compared to all the taxes which could be taken from potential profits in the long term.
We should be helping businesses become profitable, not penalising them for failing to do so.