The three witches are thoroughly evil. As such, they hate what is good and like what is wicked. In saying "Fair is foul and foul is fair" they are expressing their own values. Later one will brag about killiing swine and another will brag about causing great hardships for the sailor-husband of the woman who refused to give her chestnuts. They admire what is foul and despise whatever is fair. Naturally they would hate young and attractive women, since they themselves are so horribly ugly. This would seem to be expressing Shakespeare's own assessment of evil people. It can be observed in present-day reality that bad people like bad people and tend to despise and mock good people. Birds of a feather flock together. Their wickedness influences Macbeth, who gradually becomes like them in hating what is good and delighting in his own worst qualities. The best expression of this idea can be found inKing Lear, Act 4, Scene 2, where the Duke of Albany says to his hateful, thoroughly wicked wife Goneril:
Wisdom and goodness to the vile seem vile:
Filths savour but themselves.
This is a truth and a warning worth remembering.
By saying that "fair is foul" and "foul is fair" the witches are foreshadowing some of the evil that is to come in the play. Shakespeare is setting the tone for the play, which is almost unrelentingly dark and foreboding. They are also establishing the fact that in the play, sometimes things are not as they seem.
Macbeth becomes the king of Scotland, but he is a usurper, occupying a throne that does not belong to them. The song, which concludes a very short scene that began with thunder crashing ominously and is full of references to foulness and evil, is not just an idle tune. The witches are predicting the future course of events in the play. Indeed, many argue that they are actually responsible for these events.