The bill was passed as the acting head of Customs and Border Protection abruptly resigned and after reports of children being held in deplorable conditions.