In banking, insurance, governmental, education and medical spheres, there are hard privacy and secrecy requirements. Same goes for military - look what happens when they slip up. If you want to think about it - what percentage of the economy do these interests represent? I would say a large portion. So to my mind a large portion of the economy has a data security requirement that don't seem to be met by web apps.
In the consumer sphere, sure you can replace some programs with javascript, but can you see apple employee's using google docs at work? Why is that?
Also in corporate networks, they may be connected but through a proxy - which would reduce the attack surface.
There are air gaps and network gaps for data security. So your conclusion is based on a false premise.
Apologies for side-tracking you with this irrelevant argument about connection to the internet - I was thinking of mobile devices specifically, which are almost all exposed directly, but you're right, there is a whole class of apps/devices which are deliberately kept off the public internet.
I can see how these intranet apps can be secure, but not when on the internet. When I hear web app, I think internet.
You're right that there's no real reason why an intranet app can't be secure.
So I'd say the web is at least equal to that in security, and perhaps better as you can quickly push out fixes and are in control of the entire infrastructure, whereas app developers are at the mercy of their platform creator to roll out fixes or allow them to roll out fixes, which can take days or weeks for approval.