The infinitive here is 'to leave', and it is used as an 'adverb', meaning 'with the intention to leave', since it modifies a verb, it has to be an adverb.
I should think so, it teaches about the difficulties others have to face. It does teach them to be thankful for what they have as well. Often, characters like the ones you described showcase independence and perseverance.
True. The "legend" is synonymous with "map key".