Last night, the Colorado Rockies defeated the San Diego Padres 2-1 in a 22-inning game. Extra inning games in baseball are a somewhat frequent occurrence, though any game lasting longer than 13 or 14 innings is pretty rare. I went to an 18-inning game once that ended 1-0-- I think that's the longest 1-0 game in MLB history, or at least it was at the time.
Anyway, extra inning games are an interesting dilemma for the teams involved since pitching is scarce. Teams, naturally, want to win games. The game must go at least nine innings, sans weather irregularities, to determine a victor. If the game is tied after nine innings, your desire to win still remains-- winning in an inning or two is the best case scenario since you use up the least amount of your scarce resource. The problem is, should the game remain tied for the next few innings, you still want to win the game in the short term-- always the next inning or so-- but the supply of pitchers you have dwindles, as does the supply or pitchers you have for the next game as well. At some point, teams usually realize the increasing costs of playing in and trying to win a single game and resort to a "we're leaving this pitcher in until it's decided one way or the other" mentality, but by this point, the team has already hamstrung itself for the next day's contest...which is especially costly if you're playing a different team the next day. It's an issue of perpetual short run. These issues get a little more interesting in the playoffs, when the value of one win is a lot higher, as opposed to one game in 162.
Thus, you end up with a 22 inning game last night that neither side is particularly pleased about-- not the loser, since they expended so many resources for a loss, nor the victor, who is confronted with a Pyrrhic victory of sorts.
I'd be very willing to bet that if you presented to the managers after a tied nine inning game that the game would end up going 22 innings before being resolved, both would immediately agree to a coin flip to settle the outcome of the game.