A staff attorney with the ACLU said the federal agencies' practices were 'both illegal and morally reprehensible.'