I have wondered this because the Trent 1000 engines are very similar to the Trent XWB engines on the 787. And if the A350 has better efficiency then why do so many airlines purchase the 787?
The answer as to why companies seem to be favoring the 787 over the A350 is in several parts, none having very much to do with efficiency.
First, a grand total of just 6 A350 XWBs have been built. The A350 is just ramping up production this year, while the 787 has been in production about 5 years now. The 787's teething problems have spurred some interest in its competitor, but as the first composite airliner to start accepting orders, the Dreamliner has a distinct first-mover advantage.
Second, Airbus has seen some production problems in its larger airliners, which tends to make airlines nervous. The A380 saw cancellations totaling over $10 billion in lost revenue primarily due to its inability to make them fast enough, causing Airbus to indefinitely delay production of freight variants that major shipping companies were waiting for. Smaller, older production lines have been doing better but the A380 line is still taking up a lot of Airbus's resources that could be spent making 350s.
Third is simple cost. A 787-8's base price is about \$225 million. An A350 starts at about \$270 million. \$45 million a plane is nothing to sneeze at; it means you can have 6 Dreamliners for the cost of 5 A350s, and the major airlines are buying 40-50 of these planes each so the savings is considerable.