Mami likely told this to Negi, because she hoped that it would stop her from choosing not to listen in the future. If Negi believes that termites attack whenever someone doesn't listen, she will likely choose to listen better in the future to avoid the termites.