The case shows how judges weigh the severity of crimes by non-citizens against the consequences of jail time for those who could be deported