Yes, you are correct that using any proprietary web service has the same downsides, which is why I have taken it upon myself to avoid as many of them as possible and support free, decentralized alternatives.
I do use github to host my source code currently, but it would be trivial for me to move to a free service such as gitorious, or a gitlab instance, or my own server running cgit or gitweb.
What do you mean you can self-host GitHub? GitHub is not free software.