Codesharing bring a number of benefits to the the airlines.
Like what KVS? Other than mass confusion, and forcing airlines to train their employees to say, "this flight is AC 593, also United xxx, Lufthansa aaa, SAS bbb, ..."? And all the mess in airline IT that it causes (which I'm sure you've had a glimpse at, since you run that availability tool)?
Can't the airlines just act in
agency for other airlines, when they sell the flights of other airlines, rather than selling them themselves, as though its their own service? Couldn't they just enter into the risk-sharing arrangements behind-the-scenes instead of dumping it all onto the customer?
What made you think it has to benefit the PAX?
Well the PAX are the ones paying the bills ultimately, are they not? "Grandma" who got scr*wed over by AC/UA at LAX, with their codeshare nonsense, may very well just fly Westjet next time around, an airline that doesn't play the same sort of bait-and-switch game.