Let's put an example an exception-tracking SaaS (Sentry, Rollbar). How do the economics of paying a few hundred bucks per month compare vs. allocating engineering resources to an in-house tracker? Think development time, infra investment, tokens, iteration, uptime, etc. And the opportunity cost of focusing on your original business instead.
One would quickly find out that the domain being replaced is far more complex and data-intensive than estimated.