Churches can easily bring together, in a short period of time, a substantial number of people, and politicians have to assume that these folks have the potential to vote. Although there's supposed to be a separation of church and state, they want to go to these churches to say hello to the people, and they assume their hello might turn into votes.