Foundations that own the open-source projects are allowed to use volunteer work by law. Corporations with a for-profit interest doesn't.
> or answering a stack overflow question?
This one is more tricky. But it depends on who asks the question? It is an individual to get help on a problem? Or is it part of the ways of working of a company to avoid hiring experts? Evaluating intention it's usually hard.
Sometimes it's nice to just make things better.
But if I spend a bunch of time fixing AWS docs, it's not like I have any need to fork it and use 8t as documentation for my own AWS-like service.
Intro-level documentation changes are the most common pull requests I get on any of my projects. And the people making them are not the ones being helped by intro-level docs.
It's a clear case of experts helping beginners.
also... with an OS project, I can actually get the code and see how it runs, test patches, etc. I can't actually do that with their services, and any docs I might contribute would be guesstimates as to how things actually work, vs how it actually does work (and what's intended), which would/should come from the company that actually owns the code in question.