You don't need the Web for that. Windows puts the positive button on the left, macOS has it on the right, and Windows CE (for embedded stuff and palmtops with small screens) had OK buttons in the title bar.
There are lots of other design sins this doesn’t excuse (low contrast, for instance), but expecting conventions to be as consistent as on a desktop OS feels naive.
There are some things where the browser will apply platform conventions, but nothing resembling the consistency you'd expect from (well-designed) native apps.
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/system-colo...
Nothing stops Web developers from flipping the buttons if they detect a Mac, but that would make things more confusing if someone is using the same Web app on multiple platforms, or if the docs have screenshots from different platforms (to each other or to the user).