The three witches have sparked Macbeth’s desire for power and set in motion a chain of events that have momentous consequences for Scotland. By telling Macbeth that he will someday be king, and Banquo that one of his line will also someday be king, the seeds of violent conflict have been sown.
Hecate is actually the goddess of witchcraft and, as such, is the witches’ superior. She is angry with the witches and appears in this brief scene to scold them for taking action without consulting her:
How did you dare
To trade and traffic with Macbeth
In riddles and affairs of death;
And I, the mistress of your charms,
The close contriver of all harms,
Was never call'd to bear my part,
Or show the glory of our art?
Note that she is speaking in couplets, rather than in common speech. Shakespeare may have wanted to accentuate her divine (although not necessarily righteous) nature through this rhyme scheme.
The scene also adds a bit of comic relief. Witches in trouble with their boss isn’t something we ordinarily see in a play, although Shakespeare certainly does like to add a touch of the supernatural to his drama.