This is something I struggle with, personally.
I have fundamental problems with an unelected council that serves for life creating law.
However, we have an extremely inefficient form of Government that doesn't allow for quick adaptation, and legal questions will arise tomorrow that did not occur to legislators today. The courts are supposed to help resolve any ambiguity.
The question over whether or not APIs are copyrightable is, however, not a question of ambiguity. APIs are software (or documentation, or source code, etc), and any category you place them into is copyrightable under the current law. If we don't want APIs to be copyrightable, then they must have explicit exemptions carved out in the law. The courts are bound to consider an API as copyrighted right now, and the only question is whether violating that copyright is fair-use.
I think the Court did the right thing in skirting the question. That's up to legislators, the Court cannot help. We need fundamental reform of IP protections for software anyway.