The labyrinth is originally from Greek mythology. It was an elaborate structure designed and built by Daedalus. Its function was to hold the Minotaur. Eventually Theseus killed the Minotaur in the labyrinth, but then he was stuck in the winding structure. He emerged when Ariadne provided him with a line of thread so he could find his way out again. A line of thread! More background in my blog post.