I don’t like walled gardens any more than the next guy, but it’s easy to push this argument into absurd territory. Are OS vendors required to offer identical APIs, to the point where it’s immoral for them to have differentiated functionality and useful features? What is even the point of having different operating systems then?
Common APIs between operating systems also introduce the common denominator problem: if OS vendor A wants to add some cool new API for third party devs to use, they have to wait until other OS vendors also implement that API, otherwise they risk other OS vendors never implementing it and devs never using the API.
We can only defeat that by having another awkward "OS" in a VM which browser/electron is.