You are laughing to show people that you understand them, that you agree with them, that you're part of the same group as them.
Rimos para mostrar às pessoas que as entendemos, que concordamos com elas,  que fazemos parte do mesmo grupo.