You're describing the race to the bottom which comes from an industry-wide habit of establishing low standards and sticking them to the user, and really all you are doing is
justifying why its okay that software sucks - not explaining how to improve it.
We can justify sucky software until the cows come home, and many choose to do so in lieu of actually becoming better engineers.
>stupid to spend resources improving UX because you'll get marginal gains at best.
This is just not true - at best, you'll get far greater gains than you imagine.
I know plenty of counter examples to your Ryanair straw man. People don't have a choice when it comes to finding an ultra-cheap Ryanair-like experience, other than to pay a little extra and have a better experience with other airlines - which tens of thousands of Europeans actually do, every single day. Ryanair isn't transporting everyone, after all. They are the cheapest, and worst of all airlines to choose from.
Sure, you can write crap software, and you'll get some customers, even still.
But, after you write the initial round of crap software, if you make the effort to write better software you will get far, far more customers. Seen it happen a hundred times over 40+ years of professional software development experience, personally, in a variety of markets (consumer and pro/industrial).
Cheap works for onboarding and startups, but it won't sustain the business. People have a very low tolerance for cheaply/poorly built things, after all...