Why would someone decide to distribute something freely? What are the benefits to the creators of a programming language or open source software if it's free (for example, php is free, and needs no license fee like visual studio)? Is it purely altruistic? Is it done for moral reasons? Or is it a business decision? Are there moral reasons for (or benefits to) open sourcing?
I am not sure if this is the right place to ask, but I think I can give you an answer to this question.
First of all, Visual Studio is an IDE (Integrated Development Environment) which costs money, the programming languages are actually free. For example, VS is often used for C# development, but you can just install csc.exe without needing visual studio.
Programming languages are almost always free to use, the tools are often not-free, but you can find free IDEs for most popular programming languages. In addition, you don't need to use an IDE, I have used notepad when I was on a machine that did not have an IDE and I quickly had to test something.
Something to keep in mind is that when a programming language is NOT free to use, it means that the compiler is not free to use.
The benefit of a free programming language
First of all, when your programming language is free to use, which essentially just means the compiler / interpreter is free to use, it is easier to have a wider adoption of your programming language. You can then earn money from selling an accompanying IDE. But take note that even in this case, people do not NEED to use your IDE. You'll have to provide a good reason for them to choose your IDE, and free IDEs often get a plugin for your language. (Look at how Eclipse started supporting more and more languages).
The benefit of an OpenSource Programming Language
This is something different than the previous question and what I actually think you are trying to say. When a programming language is open-sourced, it means that the community can contribute to the language and you get the advantage of a lot of passionate people helping to build a great tool. This way, people who like your programming language because it has some features they like or because it is popular in a certain domain, will contribute back to the language and it will keep becomming better. Or at least, it will evolve.
Currently, because a lot of languages are already OpenSource, some people might really like 95% of the language but 5% they think should be different. It's "easy" to build your own language based on the already existing OpenSource language, but can have the restriction that you are free to adapt the language BUT, every adapted languages needs to be OpenSourced as well. This is a way for the 'original' language to ensure that no one will release a commercial version of the programming language.
And why do people do this initially? I think there are subjective reasons here. I prefer to share my code and make it open source, because I believe that first of all other people might benefit more form it than I will. Secondly, I think that code should be like mathematics and should be 'public knowledge'. But this is personal.
And why do people contribute to OSS projects? Well, once again, this is personal, but when I contribute to OSS projects I do so because I like the project and I enjoy programming. It can just be fun to solve some challenging problems on big software, it's like a hobby.