At a higher level, society doesn't have any more right to the API than it did before it was developed. The simple fact that it does benefit society proves that the design was valuable. Again, the developer should be compensated and society should gain (we need to stop thinking these two things are mutually exclusive). This also is the general basis for our intellectual property laws - creators are granted a term of exclusivity in exchange for sharing their work with the world.
By bringing "fair use" into this, I was trying to illustrate what I see as the optimum balance between society and API creators. Evidently, we disagree on where the balance should be (which is, of course..."fair"), but I wonder why someone would open an API if they don't want people to use it?
In the particular case of Java, I'm sure many of us here remember how hard - and successfully - they marketed it as a "write once, run anywhere" language when it first came out. I think that turned out to be a bit of a bait-and-switch thing, possibly due to the acquisition by Oracle, which may now have a different vision for it than Sun had originally planned.
Specifically, I don't think Java would have been adopted so widely and so quickly as it was when it first appeared if the marketing had instead been "write once, run anywhere, but never re-implement it." I'm not sure what specific legal promises were made about it at back then, but nobody understood it that way at the time. In fact, Sun took great pains to keep it standardized and even eventually succeeded in getting Microsoft to back out of the tactic of "embrace and extend" that they were known for at the time.
Likewise, on something like Python, its creator, Guido van Rossum, seems to like to steer it's future course, but doesn't try to quash alternatives. In that vein, in the book "Little Big Man," (highly recommended, BTW) the wise Indian chief, Old Lodge Skins, is not the chief because he forces anyone to do anything; instead, when he says "I think I'll put my teepee over there," people naturally put their own teepees nearby because they trust his wisdom.
Then again, tribal chiefs of the 1800s were much more oracular and less litigious than their counterparts in some of their modern corporate tribes. :-)