Someone has to pay the bills, so they need to earn some money. If you ain't paying you are the product is always a good metric, but in the email case the problem is also that a lot of the effort is manly IT admin rather than just the backend software.
You can roll your own dovecot and run your own emails at home in theory, in practice you need to be trusted by the major email providers to be able to send emails not tagged as malicious by anyone.
To protect their trusted status most providers collaborate on a lot of elements to be mutually sure they are not flooding each other with worthless spam. This is a lot of SPF, and other technical bullshit to be able to run a mail provider someone has to pay for
In case it is not clear: most use foss backend (dovecot or other), but this will not cover the whole software stack needed for an email provider