"Would you say Github benefit from open source developers using it? (And if not, why do you think they provide the service?)"
Let's assume it's an equitable exchange.
"These people are maintaining free Docker images for Docker users to use. They're not charging for this, and Docker benefit massively from these images being available!"
Getting into nuance here, I do see the benefit a corp has over hosting source code, training data, reputation, so we see eye to eye there. But I don't see much benefit of hosting container images. Add that to the fact that hosting images is orders of magnitude more expensive than hosting code!
What value is there in being a provider of free hosting that is commesurate with being a host of source code?