I think both observations are correct as far as they go. There is a political calculation at work in Haley’s book and the speeches that have gone with it. Interestingly, Haley doesn’t highlight her policy disagreements with Trump so much as her disagreement with his rhetoric and choice of words. In her book, Haley retells the story of the president’s reaction to the violence in Charlottesville after the tiki-torch parade. She said that at the time she felt that the president’s words “had been hurtful and dangerous.” And so she “picked up the phone and called the president.”
Ultimately, Haley is at pains to emphasize that her loyalty to the president is also a loyalty to the voters who put him in office. By respecting the president, even when she disagrees with him or his way of doing things, she’s respecting the voters she may hope to win someday.
One may find this cynical or savvy on her part. I’m not a natural Nikki Haley supporter. I haven’t found her speeches all that impressive. And I tend to be on the opposite side of the intramural conservative debates about foreign policy. But even if one takes Haley to be making a calculated political maneuver by demonstrating “her loyalty to Trump and her independence from him,” we should note that this is precisely the right thing to do constitutionally. And she knows it.