There are a lot of projects that were handed to Apache to manage. Kafka for example was initially created by LinkedIn. So yeah, you are right, big corps are actually creating those tools, and in addition to this, giving it away as open source to public.
The point about Apple hiring best graduates who got their education mostly free of charge cause of all the tax payers really shift my mind about the whole tax-avoidance thing.