Prospero uses the pageant to serve a couple different purposes. First of all, Ferdinand and Miranda are about to be married, and a masque was a traditional celebratory event surrounding weddings.
Secondly, Prospero takes some issue with some of the things Ferdinand says in reference to his wedding night, and Prospero uses the masque to reinforce the more societal (and less physical) responsibilities of marriage through the words of the goddesses.