No prisoner's dilemma here. Over the long term, symbiosis is more useful than parasitism. More fun, too. Ask any mitochondria. -- Larry Wall in <199705102042.NAA00851@wall.org>
Lots of people who are otherwise careful about details loosely use terms like 'free software', 'public domain' and 'shareware' as if they were interchangeable. Many people who write programs for their own use or interest that turn out to be useful or interesting to other people would be happy to give up the requirement of asking permission for use. One way to do this is to place software in the public domain, giving up the copyright entirely. This means that anyone can do anything with it. For example, your least favorite software company can incorporate in their next overpriced program and make a fortune out of it, or the idiot at the next university can introduce lots of bugs and distribute it to students and faculty alike, who will think you wrote it.
For this reason a lot of programmers want to keep the copyright for their work, and impose some restrictions on how it can be used. These restrictions are a software license -- it is only legal to use the software if you agree to follow the restrictions. It's very important to give an explicit software license when you put your programs on the Web, as otherwise people don't know what they are allowed to do with them.
Some people allow anyone to use or copy the program, but not to modify it in any way. More commonly, programmers will allow you to modify the code and incorporate it your own programs under some restrictions. This may only involve including a notice acknowledging the source of the code, or it may require you to make your modified versions available to everyone. This is called "free" or, less confusingly, open-source software. This is "free" in the sense of "free speech", not "free beer". Open-source licences all allow people to charge money for distributing your software. They can't charge an unreasonable price, because people can make as many copies as they like, for free. There are a number of companies whose main business is selling CD-ROMs of free software -- lots of people are willing to pay $20 or so for the convenience of a CD-ROM. This enables open-source software to be used by people without fast Internet connections, and so is a Good Thing.
This category does not include shareware, which typically requires you to pay for each copy of the software that you use, and doesn't let you modify it. The only real difference between shareware and commercial software in the shops is that it's easier to use shareware illegally and harder to get caught.
While the low cost of open-source software is a real benefit for teaching purposes -- you can give it to students -- there are other benefits for statisticians. The main one is open peer review. Bugs get found and fixed a lot faster in open-source software because lots of people have the ability to track them down, the same way that bugs get fixed in peer-reviewed publications. Two good open-source statistics packages are R and XLISP-Stat.
I use the GNU General Public License for most of my statistical software, since it is convenient, fairly well accepted, and allows people to do the sorts of things I want them to.