Legal, finance, Shopify are all useless without a product to sell. Hence, costs.
Your business acumen is messed up. If your product is stagnant like most financial products, importance shifts to other things like marketing, cross-selling, etc. Don't get confused between the profit center and the cost center that occurs when products are stagnant.
Yes, some tech has improved things like better analytics and tracking for companies such as personalized car insurance or paperless but notice how this improves the core products features or cost.
"If you are using Shopify, that isn't a cost, it is an investment. It isn't like legal or finance, usually, because it is product-related and can be used to reduce prices/improve service."
No, just no. If I am Apple selling iPhones, no investment in Shopify or websites is going to help me make better iPhones.
Shopify is not product-related. What you mention is a Mandatory marketing expense which is also a cost center. You either have your marketing team or you hire an external marketing agency.
You mention distribution. Marketing without a product to sell is useless. Hence, costs.
Insurance and other financial companies need marketing to sell. It is a mandatory expense for them. It is not their product but their product is stagnant so it matters very little.
However for Facebook, marketing is their product, profit center. There are other orgs who sell marketing automation software. There it is a profit center.