As many have mentioned, w3schools ranks high because it is actually used a lot more than MDN.
People love it because they don't have to read. Just copy and paste and you can get back to work. And that's fine. It's a nice thought that programmers should understand their code, but remember that article about 99% developers. They get work done, ideals only stand in the way.
The actual issue with w3schools is that the code that's available for copy-pasting is terrible. A lot of it looks like it either hasn't been updated since 90s or 00s, or at least whoever wrote it hasn't done web development since then. That's not necessarily bad, but for example JavaScript was much more of a pain back then, and you can now write much more maintainable code. Same for how HTML has progressed.
I wouldn't replace w3schools with some bleeding edge frontend practices, or even with the newest web standards, because those are even worse than using spaghetti code from the 90s. The former is way too complex for just copy-pasting, and the latter requires you to read about browser compatibility and other caveats, so it is harmful to just copy-paste it.
What I wish would replace w3schools, is a site that takes into account both why people love using w3schools, and still sets them on the right path to write maintainable code with at least some best practices considered.