Engine type
Not sticking to just the A318...
this family started of with both CFMI and IAE engines and as you mentioned the P&W engine came along later as a replacement.
Company choice, this can be because of a better financial deal with one of the engine companies, availability of engine and spares, previous knowledge of the type fitted to other aircraft so reducing training, perhaps better SFC than the other model even with same performance figures, common engine type within a company fleet so reducing spares holdings and the list can go on and on.
TW