SMTP_PORTS in this context, is defining what ports CSF should block underprivileged users from connecting to directly.
In the olden days, there was a script called Dark Mailer (I'm sure there were a lot of others) that worked by connecting directly to mail exchange servers on port 25 to send out spam. In this way, your server's IP address was implicated because it was where the message was coming from, but since it was done by connecting directly to a recipient's mail exchange on port 25, there was no log of it.
Effectively, it allowed under privileged users (web hosting users) to connect directly to
hotmail-com.olc.protection.outlook.com on port 25 and do a full SMTP transaction to send emails to various @hotmail.com email accounts.
What this setting in CSF is doing is defining an iptables that blocks users (users that aren't defined in
SMTP_ALLOWUSER or group'd in
SMTP_ALLOWGROUP) from connecting directly to port 25 for any host. Effectively killing the ability to use these Dark Mailer scripts.
By listing only port 25 here, you still allow outbound connections to port 587 and port 465 (or any other ports for any mail service that you might be using). But as
@fln pointed out these are commonly message submission ports that require SMTP authentication before it will accept any email. Another words, you can't connect to
hotmail-com.olc.protection.outlook.com on port 587 and send an email to a random @hotmail.com email user. Of course... if a mail server is allowing mail to be relayed out through connection on port 587 and 465... then a script like Dark Mailer would still work. But if a mail server is allowing that, then it's misconfigured.
You have to understand that sending mail from server to server with SMTP is designed be done on port 25 and port 25 only. This is defined as an MTA. When your email client is connecting to a mail server to send an email to a recipient, that is MSA (Message Submission Agent). Now the confusing part is, port 25 CAN be used for both of these. It's entirely possible that your email client (MUA - Mail User Agent) is connecting to it's outgoing mail server (MSA) on port 25 and then that server is sending that message (MTA) to the recipient's mail server on port 25 as well. But in recent times, port 587 and port 465 (implict TLS - the connection is encrypted before it reaches the mail server) have been preferred as MSA ports to help differentiate this. The protocol for MTA and MSA is still the same - SMTP - but commonly MSA ports require authentication to prove that you are allowed to send mail through this system. So while port 25 can be an MSA and MTA port, the same is not true for ports 587 and 465. Ports 587 and 465 are not designed to be MTA ports. They are intended as MSA ports only.
So what's happening here with CSF. CSF is going to prevent local under privileged users on the server from connecting to any host on port 25. But those same users can still connect on port 587 or 465 on the localhost - AND authenticate themselves to the mail server - and still be able to send out mail.