The creator of Peter Pan gave the rights to a children's hospital so they would always collect the royalties and fund the hospital!

Peter Pan is also known as the boy who wouldn’t grow up. He is obsessed with preserving the innocence and light-heartedness of his childhood at the expense of personal maturity. His story shows us that perhaps growing up is underrated and maturity isn’t so bad. And so does the writer of Peter Pan, J.M Barrie.

In April 1929, Barrie specified that the copyright of the Peter Pan works should go to the nation’s leading children’s hospital, Great Ormond Street Hospital, in London so that they could remain open from the royalties from the story. Instead of wallowing in immaturity like a significant number of people who experience sudden and mass fame, Barrie realized that there was a world and people beyond himself.

(Source)