Because she wanted to leave with Ace, and already 2 chapters ago told luffy she's been waiting for him for a long time. Not only that, but if the unverified dialogue leak from 12 hours ago is legit, it pretty much mentions Yamato thinks Luffy is the next best thing to get her out of Wano because he's Aces brother.