Every authoritarian needs secret police. ICE happens to be the perfect agency for Trump to use for this, because immigration is such a hot issue for his base, and immigration law provides some nice loopholes in constitutional guarantees.
For example, deportation is a civil action, not criminal. That means that to exile you from your home the government does not need to prove their case beyond a reasonable doubt, does not need to provide you with legal representation if you can’t afford a lawyer, and the procedure takes place in an administrative court. There have been numerous cases of small children representing themselves in deportation proceedings. And this was all before the current administration.
The point of a bogus database is to give them cover for arresting, imprisoning, and deporting anyone they wish to.