And all of the above is about the legal, technical questions about what the law is. The public policy question of what the law should be is a different matter entirely, and opinions about that generally should be addressed to Congress, not the Supreme Court.
I think you're mixing up different types of intellectual property:
- Trademarks are intended to identify a source. Trademarks cannot be functional, they have to be descriptive.
- Copyright must express a creative idea. That idea can be artistic, or functional. Computer code and APIs can be copyrighted (as they most often are), but they can also be patented.
- Patents cover inventions with some utility. One can definitely patent a piece of art if it provides some utility.
It's not uncommon for companies to throw all three at whatever they are cooking up.
There was a time when software didn’t have copyright protection. Somebody had to make the first move.