Part of the problem is that the websites need to "share" budget with the teams that build 2 separate native apps (or maybe they use something like React Native, but that still costs money that could've been used for a better mobile website).
Also, if a company has a mobile app, a bad mobile website is less of a problem. Take Takeaway.com. Their mobile site is terrible. But they have a pretty good mobile app, so why would they need to pour money into making the site any better?
But yes, (mobile) web also just needs to do better.
Ready to use (or buy/download) controls in appdev usually pack some ui wisdom into themselves for free, borrowing most of it from the base system.
Webdev is constant reinvention of a wheel in all sorts of wrong ways, with “components” on the same level of ui quality.
Many apps are just electron apps or vb-like (x,y,w,h) forms slapped together by someone barely familiar with a platform IDE. But the rest is absolutely superior to the “web”.