> Google, Meta and Amazon would likely not face any significant business loss if all of their software (source code included) was publicly leaked
You don't know that. Granted, there are other barriers to entry in some markets, but stealing others' control and data planes would go a long way towards building viable competitors without having to expend the same level of investment.
You're cherry-picking the relatively small number of companies that support your argument. Besides all the software they've built, each of these companies has filed for and been issued mountains of patents (though not copyright, it's another IP protection scheme) and will enforce them if necessary to protect their business. I bet yours might have some, too.