The logic is that a company can issue shares in itself to raise capital, rather than having to borrow.
Issuing shares is the equivalent of selling a cake in 1/16th size slices rather than 1/8th.
If the price per slice remains the same,
you get more money.
So each time there’s an initial public offering or share issue, everyone who buys those shares puts money straight into the company’s coffers for it to invest in things needed for growth, such as more staff or better technology. Ocado recently raised a huge amount of money this way.
Afterwards the shares are traded as an asset, but the company got the initial money it wanted at no cost (other than fees associated with the process, which are very small compared to paying interest on borrowing).
This is the reason share buybacks in public companies are so ridiculous, they achieve the opposite of what the system should be used for, pushing money from companies to investors rather than vice versa.