This feature has similar purpose as $CFG->noemailever. If $CFG->divertallemailsto is set, the email_to_user() will use this address instead of the standard recipient's $user->email. Therefore developers working on an emailing feature can easily track all outgoing emails.
Example: in config.php
$CFG->divertallemailsto = 'some.email@localhost.local';