Immigration Minister Kris Faafoi chose administrative ease over the rights of families and children, according to lawyers in the High Court.
Two New Zealanders have taken the government to court over its stance on overseas visa applications during the pandemic.
The case could also affect migrants and their partners and children separated by the border.
A legal crowd-sourcing fund reached its $50,000 target today.
Auckland university professor Michael Witbrock, whose husband is in China, and Levin businessman David Higgs, whose fiancée is in Indonesia, brought today's case.
Higgs was due to marry his fiancée last year, but her visitor visa application joined thousands of others in being cancelled.
He cannot live with her in Indonesia because of his medical conditions.
Witbrock faces different challenges.
His lawyer, Pooja Sundar, said the government did not take into account those couples who could not live in a foreign country first, before being allowed to do so in New Zealand
They have been unable to bring their partners into New Zealand during the pandemic, not just because of border restrictions, but because immigration stopped processing their visas, then cancelled them.
Visa processing overseas has been suspended since last year and their applications were cancelled earlier this year.
The men say those decisions have breached international obligations and immigration requirements about couples having to live together to qualify for partnership visas are discriminatory.
Some cannot move abroad to live with their partner due to family, medical or cultural reasons, they say.
They are asking for their partners in China and Indonesia to have their visas considered.
Their lawyer, Stewart Dalley, told the High Court the minister used a blunt tool by cancelling all temporary visas.
Dalley said the government decided it was too hard to find which visitor visas were for tourists and which ones were for partners and children, so cancelled them all for administrative convenience.
He said the minister does not believe he has international obligations to couples who have not lived together, nor to the families of migrants.
But the government said it did consider international law when it made its decisions, and other avenues were open to partners.
Crown Counsel Matthew Mortimer-Wang said the government made a general rule as it had thousands of applications it could not approve or reject while the border was closed.
But he said that did not mean it overlooked individual rights.