Let us remember that this famous quote is uttered in the final Act of this play by the governor when he learns that Hlestakov has managed to deceive not only him but the entire town and that he has swindled them out of lots of money. The way in which the governor addresses the audience directly is significant, because it challenges us as the audience to consider why it is we are laughing. On the one hand, the situation is ludicrous, as the governor and other characters have been tricked easily by Hlestakov and we have seen how this has worked.
However, the way in which the governor challenges us through these words indicates the way in which, to an extent, our laughter condones such apparent deception and trickery. We are implicated in this crime as well, and in particular, in a play that talks so much about corruption and deception, we can see the way in which the play is actually harshly condemning those who stand to one side and observe such events without intervening and putting a stop to it. Gogol's message is certainly clear: it is just as bad to watch on the sidelines and not do anything as it is to be tricked in the first place.