Federal officials said the move was meant to discourage immigration by people who they deemed likely to rely on public benefits.