Without the Samoa test the All Blacks would have gone onto the opening test against the Lions at Eden Park cold, while the tourists would have had games against the New Zealand Barbarians, the Blues, Crusaders, Highlanders, Maori All Blacks and the Chiefs.
"June has historically been a struggle for us because you've got the need to bring players from five franchises together and traditionally it takes a little time. So having that game will allow us to speed that process up," Hansen said.
"We're playing an opposition who've played four or five games before this test match and they'll certainly be ready."
The All Blacks played Fiji in a test match on the eve of the first test against the Lions 12 years ago, winning 91-0.
The 'struggles' Hansen speaks of haven't resulted in defeats with the All Blacks last losing a June test to France in 2009, but they were pushed in the opening two tests against England three years ago.
Hansen said having two tests at the one venue will make for a 'wonderful evening'.
"Along with Tonga and Wales it's going to be a wonderful evening where you've got Pasifika rugby on show and Welsh rugby and New Zealand rugby. It allows us to fill a need for ourselves as we need a game to prepare for the Lions and also give something back to Pasifika rugby."
Wales head coach Robin McBryde said: "We have a huge amount of respect for rugby's Pacific heritage, so to be able to compete in a double-header celebrating that is very special. It should be a fantastic occasion."
Tickets go on sale next Monday.
All Blacks v Samoa
- The two nations have met six times since their first clash at Eden Park in 1993.
- The All Blacks have won all six encounters but the last test in Apia in 2015 was the closest match, with the All Blacks winning 25-16.
- It will be Samoa's second test against the All Blacks at Eden Park following the 1993 clash, won 35-13 by the home side. Since then they have played tests in Napier, Albany and New Plymouth.
- Samoa have had a victory at Eden Park, beating Fiji 27-7 at the 2011 Rugby World Cup.
- Samoa need one more victory for 100 test wins.