If you automatically throw out cases, what's the point of having a law enabling and encouraging those cases in the first place? Or maybe a better question is: what would legitimate infringement look like, if what Google did is fair use?
I don't know if APIs should be subject to copyright or not. I certainly don't want them to be. But since APIs have been found copyrightable, it's hard to understand how this wasn't open and shut for Oracle.