First, remember that Shakespeare wrote "Macbeth" to compliment King James I, who had become the patron of Shakespeare's acting company in 1603. Shakespeare referenced many of the King's ideas about government and religion in the play. One of King James' interests was witchcraft, about which he wrote extensively. Shakespeare took information from two of the King's accounts on witchcraft and incorporated these ideas in the play. For example, in 1.2 the idea that witches sail in sieves or that they can cause storms on sea is taken from the two sources on witchcraft authored by King James. Also, in 4.1 the details of the charm elaborated upon by the witches is taken directly from the King's account of a witch concocting a potion to be used against the King himself.
Secondly, the detail used to describe the spell in 4.1 helps to show the progression of Macbeth's downfall. In the play's first scene, the witches briefly plan a meeting with Macbeth. In 1.3 they meet with Macbeth and pronounce their alluring prophecies. By the end of 3.5 Macbeth determines to seek the witches himself for the truth of his destiny. He is willing to put his soul at risk by putting his faith in the evil witches. So in 4.1, the last time we see the witches, the spell will bring forth the 3 apparitions which beguile Macbeth into his final descent into evil.
To settle the rowdy groundlings, Shakespeare needed an opening scene guaranteed to grab their attention. The Elizabethans believed in the existence of witches; these in the play quickly convey their evil natures as they call to their familiars. The audience would probably have gasped at the witches' appearance. Secondly, the witches' chant "Fair is foul and foul is fair" sets up one of the most important themes in the play: the difficulty in determining the difference between appearance and reality, between what appears to be good and what appears to be bad. Macbeth as well as other characters must grapple with this issue throughout the play. Macbeth's first line in the play, "So fair and foul a day I have not seen," referring to the battle, echoes the witches' chant and immediately ties him to them. If given the chance, the witches can have enormous power as the play develops.
A good question since the three witches set the scene for the entire play with this chant. "Fair is foul and foul is fair" is a major motif throughout this tragedy. That is, nothing is what appears to be. Thus, when the witches predict that "Macbeth shalt be King hereafter" (1.3.53) a seemingly fair prediction, it turns foul as Macbeth takes it upon himself to murder the living King to receive the title. Also this chant illustrates the topsy-turvy state of Scotland, where nothing is what it appears to be. Duncan's remarks concerning how pleasant Macbeth's castle looks in Act I reflect this; he is murdered in that pleasant castle!