It's a little dated now, but the book "The Sporty Game" by John Newhouse (1982) gives some good insight into the sales competitions for both airplanes and engines. Till I read it I never realized that the engine selection process was as competitive as the airframe selection.
Selection considerations can include any/all of the ones listed by the other posters, and political considerations can certainly be equal to or outweigh economic and/or operational reasons.