They spend a lot of money on things like Swift Playgrounds, though. They have a whole developer outreach and training program: https://developer.apple.com/learn/curriculum/
It's a puzzling omission, given that building App Store revenue is such a priority, and they feed the supply side in a number of other ways. I don't think they're doing it on purpose, they're just bad at it.
However, apple is a business, and leaving out docs makes business sense and is an easy and straightforward explanation.