Huckabee didn't outsmart anyone. McCain, in a rather underhanded move, had his supporters vote for Huckabee, because he knows Huckabee doesn't stand a chance, and he wants to keep Romney from winning the delegates.
Huckabee's "victory" is more of an embarrassment to his candidacy than a victory.
Romney didn't get outsmarted, because there was nothing that he could do to stop this underhanded tactic.
Huckabee is playing the role of spoiler to keep Romney from winning. It appears to be a role that Huckabee is satisfied with if he can't win the nomination himself.
He won.