They are elected because intelligent and honest people/republicans)don't put themselves on the ballot list because they know they don't stand a chance of getting elected: A sizeable portion of the electorate believes in fairy tales and uses (expressed) belief in creationism as a litmus test. If you don't want to lie, you don't get elected. If you do have the brains to understand that creationism is nonsense, you don't get elected.
Look at Trump catering to the religious right right now (promising to give christianity power, abolishment of a law that prevents churches from becoming supPACs, Pence).
If you want good politicians, everyone should start speaking up against stupidity instead of respecting opinions and feelings. Value truth instead, use the Golden rule for morals, instead of some book with contorted morals (slavery, misogyny etc.).