That's exactly why fair use exists. A teacher showing a movie in class is fair use, editing a clip for memes is fair use, making backups is fair use. APIs are copyrightable, but independent implementations are fair use, this is an outright win IMO. SSO might or might not be copyrightable in all of these cases, but we have certainty with fair use for specific cases.
In deference to OP, the question was never "Are APIs copyrightable?" The question was is what Google did in taking header information and doing their own implementation fair use, and it's unquestionably good now that the SCOTUS said this is fair use. Make sure to actually do your own implementation though.
Sun/Oracle didn't want to fragment Java, they copyrighted the language spec, and provided the JVM under SCSL before GPL. Java isn't fragmented, Sun/Oracle got what they wanted.