The last is a specific idiom. If a person loses his job, or leaves work at an office, we don't say, "He left office".An article-less noun can mean a general or original purpose of the word. Is that why legend has no article? Doesn't it mean any specific legend, but general legend?
ex)Have you heard of the story of King Arthur? It is an old British legend about how Arthur became a great king against all odds. According to legend, Arthur was the first son of King Uther Pendragon....
It means legend in general, as in "according to history" or "according to law".
Are these the similar examples? Yes.
1)I go to a school => go to an unspecific school(physical meaning)
2)I go to the school => go to a specific school(physical meaning)
3)I go to school => No physical location implied, just the action of going to school for learning, the original purpose of school is realized
Also, "I left school at 16". The meaning is general.
1)George Bush left the office =>He left the building of his office to leave for the day.
2)George Bush left office => He resigned the presidency. No physical meaning, just the action of resigning one's post.
Student or Learner