It's because the EU is forcing competition on them for iOS Safari, and iOS Safari shares code with MacOS Safari. Now they have to at least try to keep up.
And it wasn't just laziness that made them drag their feet. They actively fear the web as a platform, and very much want everyone to do everything through their app stores, using their own macOS/iOS-exclusive proprietary SDKs... which also means developers themselves needing to acquire a Mac with XCode, and a Developer subscription.