Capital expenditure (infrastructure) and operating expenses are treated differently.
An investment in a new factory cannot be deducted as a business expense all at once; it must be depreciated over its useful life, so only a portion of it can be recorded as an operating expense against income for every year it is used.
For software companies it's fuzzy; if you have a team of developers constantly working on enhancements to the company's platform, should the staff wages be counted as expenses or capital investment? It comes down to accountancy technicalities:
https://www.wallstreetprep.com/knowledge/accounting-capitali...