It's a good question and that initially alarmed me but it's because the way we disable mail sending is actually not to prevent any of the code paths that generate emails, but rather we change the transport mechanism for mail to use a special NullTransport
class. Rather than transmitting the email (via either SMTP/Sendmail depending on what you have configured) it just doesn't do anything.
It's useful from a development point of view because as far as XenForo is aware, the email was sent and it means any code we have used to send emails still works, even though nothing is actually sent.