I remember the bad old days when you had to have a few huge O'Reilly books to write advanced HTML or program Javascript because Firefox and IE and other browsers were all so different -- you were lucky to have any official documentation at all, never mind something that looked at Javascript from a portable point of view.
MDN paved the way for having online developer info available for the web platform. I use it every day. In fact, I go out of way to look things up on MDN because if I just search "Google" I get spammy and sometimes wrong results that are crammed with ads, often poorly written, etc.
It is sad that good documentation can't pay for itself. It's like "the truth is paywalled but the lies are free".
Tip: use DuckDuckGo's searchbangs[0]. I reach for !mdn everyday.
Mozilla is not alone in maintaining MDN
MDN is good, especially as a reference to refresh something I once knew but haven't used in a while, or to deepen my knowledge of some part of something I do know fairly well.
But when it comes to learning something new and big, I often get lost on MDN. After I finish reading one page, it can be unclear what page I should read next. After I've made a few such choices and seem to have reached the end, it is often not clear if I've really covered the topic or there might be more if I go back several steps and make a different choice.
In the O'Reilly days, to learn topic X I could just get "Learning X" to get the basics, then "Programming X" to get a deeper understanding, "X Cookbook" for a ton of examples, "Advanced X" to go even farther, and maybe they would also have some more specialized books covering the use of X in specific applications. There might also be more books between beginner and advanced for some topics. And maybe an "X Reference". (There was also for some topics "X: The Definitive Guide" which tended to be a massive book that kind of tried to cover from beginner to advanced in one volume).
There would be an O'Reilly book aimed for people at whatever my current level of X understanding was, and reading that book would take me up a level.
There's no reason a website can't do that too, but it doesn't happen automatically. The website needs to provide guidance to lead the reader through in a page by page sequence that will take them through some topic in a way that makes sense and is complete. It's way too easy for a site to end up with a lot of ways to wander off such a path and end missing things or getting things in a confusing order.