>Why isn't this build into every major operating system by now?

Because no desktop OS besides MacOS can handle Sleep with any semblance of competency.

>Why isn't this the default

See above.

I've spent the last 5 years trying to figure out how to get Macs to remember which display goes on the left when waking from sleep. No luck yet, maybe it's fixed in Ventura or with M2s?

I had a similar problem with identical monitors that I used something called displayplacer

https://github.com/jakehilborn/displayplacer

Later I chained the displays differently and moved the adapters around so it stopped being an issue.