But it is. I installed F-Droid by visiting a website, so it's definitely possible.
Maybe you're talking about Apple specifically? Afaik, there's no way to do that on iOS (though I read a related article about it recently, I think it was here), so if you want that, petition Apple. There's no law preventing it given that Android devices can do it, so it's just an Apple policy, and you can always install apps through XCode if you want to.
So let's say this law passes BUT someone builds a really good open-source messenger.
You can't install it now because you can't side-load apps on devices.
You alpha geeks can but the other consumers can't.
What we need is a law requiring some type of side loading.
It needs to be possible to go to a website, and install an app there directly and have it support all of the native platform features.