As per the previous comment, most of it comes from the way the laws were written. If immigration law says “members of a terrorist group can’t get citizenship”, then USCIS has to have a process for following it. In addition to background checks, they ask the question.
In terms of booting them out, the question makes it much easier. If they are a member of a terrorist group and they said “no”, well it’s an open and shut case of lying on an immigration application. If they didn’t ask the question, sure they could still boot them out, but it may be a prolonged process.