For more offensive teams, Espeon is used over Xatu for its much more powerful special attacks (its Grass Knot for example deals significantly more damage to Groudon and Kyogre) and its ability to use Yawn and force any entry hazard users it can't hit effectively to switch. So for example, it can switch into Dialga and reflect Stealth Rock, and then use Yawn while surviving a Draco Meteor with Focus Sash. Espeon can then choose to keep using Yawn to make the opponent switch around a bit and rack up Stealth Rock damage on their team, heal with Morning Sun, or hit something on the switch with one of its attacks, depending on the opponent's team. Later on in the match, one can weaken the opponent's Dialga on the switch, by luring it in with a Palkia and hitting it with Spacial Rend on the switch, for example. Now that Dialga is weakened, it is within range of being KO'd by many different attacks, thus preventing Stealth Rock from being on the field. Yawn also forces Seismic Toss Chansey and Deoxys-D to switch, which is necessary or else they could just stay in and outlast Espeon/Xatu in a stallwar (unless Xatu has Toxic, but Thunder Wave is generally better). But for more stall-oriented teams, which lack the power to easily dispose of Dialga anyway, Xatu could prove to be more useful for the reasons you mentioned. All in all, both of them have their own specific niches and thus have their place in different teams. But I have tested them both thoroughly in numerous different teams though, and overall, despite neither of them outclassing the other, I do think that Espeon is generally the more useful of the two.
And yeah, Magic Bounce was never a guaranteed way to keep entry hazards off the field, but neither is Rapid Spin. And I generally find that having to utilize prediction in order to keep my field hazard-free is better than being absolutely unable to remove entry hazards as long as the opponent just has an Arceus-Ghost or Giratina Forme in their team.