Because the federal courts already ruled that APIs are eligible for copyright [0].
Google wanted to overturn the ruling that they were in violation of copyright and argued they used Java's APIs fairly under copyright law.
The court will not answer questions not put to it, and Google (I presume) felt they had a better shot at getting the court to agree it was fair usage, rather than arguing copyright should not apply here.
0: https://www.paleudislaw.com/federal-circuit-rules-that-apis-...