Interesting answer from godless-life on https://redd.it/kinj3f:
Former banker in an international settlement department here.
SEPA transfers are done via bilateral settlement between two central banks in Europe, in the same currency, which is a fully integrated and near seamless process.
SWIFT is a private company domiciled in Belgium that facilitates financial transfers (not just payments) and they (1) don't work for free, and (2) often require their member institutes to input certain information manually, so they will also charge for the cost associated with that.
Also, from https://en.wikipedia.org/wiki/Wire_transfer#Regulation_and_price:
Since 2009 the European Union Regulation No 924/2009 [2][3] controls cross-border payments in the European Union. In the new regulation Article 1 (q.v., Ref.4) states that an IBAN/BIC transfer within Single Euro Payments Area (SEPA) must not cost more than a national transfer, no matter which currency is used. The receiving bank can charge for exchanging to local currency.
and https://www.investopedia.com/articles/personal-finance/050515/how-swift-system-works.asp#inside-a-swift-transaction:
SWIFT charges users for each message based on message type and length. These charges also vary depending upon the bank’s usage volume; different charge tiers exist for banks that generate different volumes of messages.
Deloitte/de/Documents/risk/SWIFT-for-Corporates-brochure.pdf contains some fees that SWIFT charges to their customers (= financial institutions).