Guess, that's to prevent everybody from coming up to take a hug.. apparently Michelle Obama didn't get the memo.
Neither did Paul Keating, former Prime Minister of Australia, who put his hand on the Queen's back. He was dubbed the "Lizard of Oz". Tony Abbott, another former Prime Minister did the same to Prince William.
The royals are just people, IMO entitled to no more courtesy or respect than any other person one encounters in a formal situation. Neither of the Aussie touchings was more than the sort of thing pollies do every day and Aussies - especially Labor republicans like Keating - aren't hard-wired to defer to members of the English Windsors in the same way Brits are. Reading Michelle Obama's account of her encounter, I doubt HM was at all offended by Michelle's light, affectionate embrace. She might have enjoyed it. I cannot imagine what William thought about being touched by Abbott, but that happened in Australia, and William is only the heir's heir, not our head of state, and he doesn't even have a formal role in Oz.