- John gave a book to Sue.
John gave Sue a book. - John donated a book to the library.
*John donated the Library a book.
So what's going on? Linguists have spent a lot of time working on this issue, and in some sense this issue is indicative of pretty much all linguistic research: why is it that you can say certain things, and can't say others?
However, in this instance, and in a lot of other instances, I'm not sure there's really a "why" answer here. Instead, I'm coming to believe that we just have heard "donate" many times, almost never in the double object construction, and so we just think we can't say it, because we haven't heard it. It's just like on the one hand we think an arbitrary coin is unbiased, but we also know the sun is going to rise tomorrow: we've never seen it not rise, and we've never seen anything telling us the coin is biased. And sure maybe there's some physics behind the scene that can prove us right, but I'd wager that we can learn arbitrary exceptions (like "donate") without having to worry about Newton's or Kepler's laws.