One of the core, fundamental concepts in Computer Science is composition.
We are all standing on the shoulders of giants, building on the work of those who came before us.
Therefore, to the greatest extent possible, our work should be available for all to build upon to the benefit of society.
Music is a more pure creative endeavor; artists generate a specific instance that is unique to them. Copyright applies in the same way that it does to a specific implementation of a program or algorithm.
Software patents fill the role you ask about for programmers. Some companies name their employees in patents, some don’t; and some “programmers” patent their ideas on their own. However, it is quite expensive to apply for a patent.
In addition, it is seemingly impossible to develop any new technology without infringing on unknown patents even for obvious ideas that you can have independent independently. Thus the balance is weighted toward large companies, who may have patent portfolios they can use defensively.
In summary, software patents are an abomination and the reason that programmers are not like musicians.