Steven Moffat is known for using these fables in his episodes as they provide a simple way to explain complex concepts. He also uses them to build up the main character in the episode, in this case River Song (Karen Gillan). This gives the episode a feeling of being a story that has been told for generations and gives it more weight than just an average television drama.
This is especially important because the episode is a mess of connect-the-dots storytelling, bombastic exposition, and fireworks. It feels like a performance from Disney World rather than a television show.
The episode has a lot of plot holes and it seems that some scenes were cut out or edited in post production. This is especially true for the scene where the Doctor meets Dorium Maldovar at Demons Run. Dorium was beheaded in this episode but would return as a still-living head in The Wedding of River Song. Despite these issues, the episode is an entertaining adventure that is well worth watching.