In general, when any company orders an "oddball" mix of any product--transportation or otherwise, they do it because of one of two reasons:
(a) They were able to get very good prices on those oddballs because they were "unwanted" orders from either other customers or in the supply line itself...
(b) They want maximum operational flexibility to do specific tasks with specific things.
Usually it's (b). It's the same with airlines...there are benefits to a standardized fleet of one AC type (all operational staff can work on ALL aircraft, usually going ANYWHERE---> lower costs, homogenous maintenance---> lower costs....etc etc etc). BUT, there are drawbacks. Some vehicles (trains, planes, busses), carry more passengers at the cost of using more fuel/resources per unit time/distance. Others carry less. If you're a big company...again trying to be general here...you reach a point at which the lowered price/increased convenience of homogeneity is offset by the mismatch between what you NEED, and what you HAVE. It wouldn't make sense to buy a long-distance bus to operate a septa city-route, it wouldn't make sense to send a silverliner car on a trip from DC to Boston, it wouldn't make sense to send a 777 to Goodland Kansas. The same is true for railyard equipment, at least in theory. E.g. one engine might be really good at hauling a lot of silverliners, with x acceleration from 0 to 15, y accel from 15 to 30 (mph), etc. But that engine might be bad at, quickly switching directions and yard moves. Another may be great with rapid accel/decel, yard moves, torque or whatever....and bad at getting above 25 mph quickly. SEPTA's RR fleet has over 400 silverliners + trackwork equip. They need variety.
With all that being said, it's (always) debatable as to whether they need THIS much variety...THIS many manufacturers (etc). The equation of utility vs cost rapidly swings in the cost/problematic direction with an extremely unicorn-centric fleet of oddball locos, and, like many things SEPTA does, lack of intelligence and penny-pinching may be playing a role here.