Fair use makes sense to me when you're talking about the table of contents of a book. If I take the table of contents of a famous novel and write my own chapters, it makes sense to me that the owners of that book shouldn't be able to sue me. No one is going to read my book instead of Faulkner's. There's no equivalency there.
If I take an API (the table of contents equivalent of software), that's seems totally different, if not the opposite really: the interface is what matters, and the implementation is secondary. If you apply the analogy to a novel, it's as if I took the table of contents of a famous novel, write my own chapters, and it'll be equivalent to the famous novel. My chapters could be slightly "worse", but readers wouldn't necessarily notice a difference between my version or Faulkner's.