Because sending emails via Tiki (sendmail) or SMTP can cause issues: Limits on numbers of emails sent, slow delivery, lost emails, mails flagged as spam, etc. Basically because there is so much spam, legitimate projects suffer. The good news is that some services offer free to use entry level services (To promote the service so you upgrade to paid service as your needs grow). The bad news is a loss of data privacy.
How to use
Configure in the Mail section of tiki-admin.php?page=general
About the code
SlmMail is an "Integration of various email service providers in the Laminas\Mail". Since Tiki also already uses laminas/laminas-mail, it is very nice extra functionality with minimal complexity/overhead. laminas/laminas-mail is the continuation of Zend\Mail, which has been added to Tiki in Tiki11 (2013).