Japan-bound Williams finished his Super Rugby tenure on a high for the champion Chiefs on Saturday night and will play the first two tests of the Rugby Championship against Australia.
That will bring the curtain down on a high-profile two-year stint in New Zealand rugby.
Hansen launched a fierce defence of Williams when questioned whether it was wrong that other players committed to staying would be denied a test spot.
"He's a world-class player now. If we didn't pick him, we'd be getting six lashes from the headmaster (the media)," Hansen said.
"He's done things that are different and sometimes in New Zealand we don't like people that are a little different.
"That's not to say he doesn't care about his country.
"We know he does and when I spoke to him about the opportunity (to play Australia), he couldn't answer quick enough with a yes."
After a lucrative 12-match stint in Japan, strapping inside centre Williams will return to the NRL, expected to be with the Sydney Roosters. He also wants to continue his professional boxing career.
Hansen hadn't spoken to Williams about it but he suspected his athletic gifts wouldn't be lost to New Zealand rugby.
"I think he'll come back. I think he's really enjoyed his time playing rugby and he's really enjoyed the Chiefs.
"I'd be confident to say it's not the last time he'll play for the All Blacks either."
Williams, who turned 27 on Friday, was wrongly painted as a mercenary, Hansen said. Instead he deserved admiration for pursuing challenges and maximising his potential.
"One or two people think he might be chasing money, but he's a professional sportsperson.
"You only get a very short term in your playing career to make money. Doctors are doctors from the time they graduate to the time they die.
"It's not his fault that he's pretty good at boxing and people want to watch him do that. It's not his fault that he's good at league."