While there should be no formal religious test for public office, i.e. no statements from anyone in government that "this post must be occupied by a Presbyterian" or "Lutherans are ineligible for office," it is entirely appropriate to question a candidate on his/her views on various subjects to avoid the danger that the candidate, once obtaining the office, will exercise the duties of that office and make policy according to his/her sectarian beliefs, which would pose an enormous threat to our liberty. Remember that this person will wield power over us, and it is both highly unethical and an abuse of power for any office holder to attempt to impose his/her individual beliefs on the people.
It is so ironic that Moore's history on the Alabama bench illustrates this problem.