The government will reserve the right to detain some people arriving illegally by boat - mainly as a deterrent to people smugglers - but immigration officials will now have to justify why they pose a risk that requires their confinement .