Why is there a fifth act in A Midsummer Night's Dream?
A good question. When asking the "why" question, sometimes it is useful to ask it directly, but sometimes we get more/better answers by asking things like, "What purpose does the fifth act serve?"
One reason for this is that a main reason the fifth act exists is tradition. Look at the different plays Shakespeare wrote: Hamlet, Lear, Twelfth Night…they are very different, but they all have fifth acts. It's a standard form.
Now, if we ask what purpose the fifth act serves, we get different and perhaps more useful answers. The fifth act wraps things up. It resolves all plot questions.
It also provides a kind of balm. The two pairs of lovers have been through experiences that would be pretty hellish if real (loving one person, then another, lost in the woods, etc.). This shows them happy, laughing, etc. It shows they weren't hurt.
Adding the rude mechanicals allows humor, and provides several different kinds of perspective on the play. It shows another blocked love affair (one that ended badly), another kind of play, and another kind of spectatorship.
There has always been 5 acts to Shakespeare's plays in general. For example, Romeo and Juliet has five acts. The fifth act is called the resolution or denouement.
This is the conclusion to the overall story.
So in "A Midsummer Nights Dream", the fifth act is the ending or conclusion.