Why do some airlines operate fleets so diversified?
There are two philosophies for fleet selection:


One type / model or one manufacturer approach
Multi manufacturer divide and conquer approach


First of all, a single model fleet is only possible for airlines that operate on sectors of comparable length. You can't do intercontinental and regional flights with the same aircraft model efficiently.

As you observe, there are obviously costs associated with flying different types of aircraft. A single type fleet like for example Ryanair (B738), Southwest (B73*) and Easyjet (A320 family) operate, means the cost of maintenance, training, etc can be kept low. Adding a few aircraft of another type to the fleet would mean additional tools in stock, diversified training and a separate flight crew group and lots of other cost factors. 

Aircraft manufacturers know that too. So if you need another 10 - 20 aircraft, your standard supplier will ask a high price for this fleet extension, knowing that the competition is never able to put in a compelling offer when all additional cost are taken into account. Only if the batch size is large enough the competitor might be able to offset the additional costs with a unit discount.

That is where the mixed fleet operator has an advantage. Since the additional overhead costs of a couple extra aircraft from type A or B are minimal, they have a better position while negotiating with the manufacturers. 

Single manufacturer airlines usually order aircraft in large numbers, otherwise they would not get a proper deal; multi type airlines can order aircraft in lower numbers. 



And then there are politics. Sometimes a national airline will be subjected to political pressure to buy from a certain manufacturer. This is especially the case for airlines operating in the international / intercontinental market. The extra fleet cost incurred will be (partially) offset by deals in another field.