"We cannot assume that everytime a situation like this arises the officials are in the wrong."
YES, they are in the wrong if they ask your religion, do they do the same for neo-nazis.
Do you have numbers to support your assertion that Muslims are prone to terrorism over all other religions.