Legal..? I'm sure their lawyers think it is?
I posted about this before, but MS got fined before by the EU for this kind of OS/Browser bundling in the late 2000s. For a while, we had an option at installation on Windows XP, Vista, 7 and 8 to choose our browser.
These were still the days of Internet Explorer, so I don't know how much MS not having a competent browser factored into this decision, but I was really surprised that with a recent fresh install I did, this browser choice prompt was gone. Not to mention all the roadblocks thrown up by MS while trying to install an alternative browser...