Everyone has different reason to publish their code using open-source license. I like sharing my code but I don't like when multi-billion dollar company make a profit from it for example. Ofc, that's what I agreed to when I release my code under open-source license, but we are all free to have different sentiment about it.