Because you can't guard your competitive advantage as easily when you need to send your entire codebase to the client, and it turns out companies like that stuff.
What's the "competitive advantage" of a webpage though? It's usually just some code snippets copied from StackOverflow and a database ducktaped together right? ;)
With modern frameworks it is not even that. What you get is a compiled, minimized page where all of the technical interesting things are lost after the build step.
The only thing you can make use of is the design and the actual content.