https://en.m.wikipedia.org/wiki/Type_certificate
Having to mix and match pilots across the fleet is less efficient, what if you have a 737 pilot but the only aircraft available is an airbus? So, many airlines (eg southwest) will indeed only use one type, or only a handful of types. This also extends to things like parts availability etc.
The economics for switching away work exactly the same now as they did a decade ago when orders were placed: there is a very real cost to operating a mixed fleet and Boeing gets to extract a lot of that value themselves.
The original Boeing 737 design only took 4 years so that would give them plenty of time to work through any necessary design changes. And if pilots need to obtain a new type rating then so be it.
And yet many airlines fly a very high amount of planes of many types, of multiple brands. Southwest is a consumer darling and punches above its weight but it is an outlier.
There are still 20 smaller regional airlines in the U.S. and hundreds around the world. The vast majority of those fly just one or two types of planes.
That's simply untrue. Most airlines use 2, 3 types of planes at most. I'm not referring to the niche 5 percent of plane types but the overwhelming majority.
And because once airlines have their fleets locked into a specific airplane brand, swapping it for the competition is almost impossible without crazy expense, so they coasted on this vendor lock in for decades knowing their existing customers have no choice but to keep buying their planes.
And also probably because "nobody ever got fired for buying Boeing".