A federal judge overturned a policy aiding undocumented spouses of US citizens in obtaining legal status, impacting around 500,000 individuals.