If you build a factory or apartment building, you don't get to expense it all at once because it's a capital good and instead you depreciate it over time, taking the expense little-by-little. This kinda makes sense, because it's assumed that you started with (often borrowed) all the money to build the factory, but it's just a one-time expenditure. Then you get ongoing revenue from it, which is offset by the ongoing depreciation. It all works out.
In the IP world, you could think of drug development the same way. We spend $1B to develop a drug, and then get income from that drug down the line. Same deal, conceptually.
The main point is that there are two clear phases: 1. spend a big pile of money to build something, then 2. get income from it. In phase 1, you have a plan for how to fund all that from the get-go. Often just a huge loan. And there is no income to pay taxes on. By the time you get income and need to pay taxes you'll have plenty, because you're not still paying to build the thing.
But then with software it starts to break down. Following the same model, you'd raise enough money to hire a bunch of devs to build your software ALL THE WAY DONE, finish it (like a factory), FIRE ALL THE DEVS because it's done, and then start collecting income from the software. You funded all the development up-front, and then by the time you're getting revenue there's plenty for profit and taxes. In some ways, LARGE companies do roughly do this.
But of course we know that's not how startup software really works. For the most part, development is an ongoing effort that never stops, and in the startup world you don't get funding all at once up-front, you raise money as you need it, as you go along. You're not going to raise $1B up-front to build an ml-blockchain-chrome-extension thing. You spend a little, see how it goes, maybe raise a little more and get a few more customers, add a couple of features, raise a little more, etc.