I think because Mercutio likes to have a good laugh, is optimistic, loyal and a good friend. ... Later on in the play, when Tybalt arrives to fight Romeo, Mercutio stands in for Romeo as he is loyal towards his best friend. Mercutio cannot believe that Romeo would sacrifice his honour in this way, so he fights Tybalt instead.
Before conformation of my answer refer to your teacher too.