Williams on Tuesday completed a u-turn on his availability for the end of season tournament, having initially insisted he was keen to rest after helping the Sydney Roosters to the NRL premiership.
Harris was named as part of coach Stephen Kearney's 24-man squad before Williams sparked controversy by reversing his decision and declaring he was ready to join New Zealand's title defence.
He came in at Harris' expense, with World Cup organisers accepting Williams' registration.
"It's been a tough situation, but Sonny brings things to the group that we couldn't ignore," Kearney said.
"He has had time since his NRL grand final win to clear his head and he wants to represent the Kiwis on the world stage.
"He missed our 2008 World Cup win and his inclusion will be a great asset in trying to repeat that success this year.
"It's not only his footballing ability, but also what he brings off the field which will benefit the team."
Harris, who made his debut in the mid-year Test against Australia that Williams missed due to a one-week knee injury, will now miss out.
The NZRL said in a statement it was in the 21-year-old's "best interests to stay in Melbourne and have a decent off-season".
"Tohu handled the situation as well as anyone could," said Kearney.
"It was a conversation no coach would like to have, but he's a terrific young man and I'm sure he'll have many more opportunities to pull on the black jersey.
"It's been a unique set of circumstances for all involved, but for now our focus is getting set to defend the World Cup with the team we have."
It was widely assumed Williams' initial reluctance to take part in the World Cup was because he was heading back to rugby union with the Chiefs in 2014.
But having made himself available, there is now genuine hope in the rugby league community that the dual international could stay on for another season with the Roosters.
Williams revealed his desire to play for the Kiwis via Twitter.
"After a few tough seasons topped with an amazing one with the boys at the Roosters, I was then faced with the opportunity to have a long awaited break and go on holiday with my family," he wrote.
"Without thinking the whole situation through thoroughly, I eagerly jumped at the chance to chill out and rest.
"After having some time to really think about how much representing my country means to me, I decided to then put my name forward for selection.
"Now I know the squad's already picked and I understand if I can't be a part of it, but I'm here and ready to help the brothers if they want me."
Williams' presence will put the heat on favourites Australia, with the Kiwis now boasting a 28-year-old capable of toppling the most dominant side in international rugby league.
But Williams may have some ground to make with fans following his u-turn.
A survey on the Fairfax Media website found almost 60 per cent of respondents did not believe he should be included in the Kiwis squad.
A New Zealand Herald poll had about one-third of fans against him and one third for, with 31 per cent clicking "I've lost interest in the SBW show".