This is interesting because software is a composition in a computer language. So the OP has an interesting point there. Code and algorithms shouldn't be awarded patents just like you can't patent a musical composition.
Software itself isn't patentable -- software licenses work on the basis of the copyright on the source code, not a patent. Software patents generally describe algorithms rather than their specific implementations, just like ordinary patents describe a method of solving a problem.