Because there are tons of people who cannot pay for services like this (lower class, students, third-world countries, etc), and learning how to build and deploy technology is powerful leverage to improving their quality of life.
There's much more to technology than websites. Those people have more important issues to worry about than access to MDN and they're not the responsibility of Mozilla either.
I mean it's not like web development tutorials and blogs haven't filled the internet with free content for years to learn everything you could possibly want. freecodecamp will take you from nothing to hirable, for free.