The engines are more valuable than the airplane in many cases. (especially on older models).
So really, if you want to look at it another way...an airline is buying a set of engines with options as to what airframe they want attached to them.
With regards to new a/c purchases, every manufacturer has its selling points. For example, on the 757, the Pratt 2000 boasted a 2% better fuel burn than the Rolls-Royce 535. The 535 proved to be a much more reliable and less-expensive on a cost-per-hour engine, in spite of the fuel burn....so much so that AA parked their Pratt-powered 757s they inherited from TWA....and then sold them to Delta.
Delta, having a massive PW2000 maintenance machine already in-place, can operate Pratt 757s and make money. AA could not.