There are multiple questions about entering churches here, most of which are marked as duplicates and pointed to this one. What none of them address, however, is why in the halacha it is forbidden to enter a church or other non-Jewish place of worship. This question is aimed at understanding the reasoning in the scripture for not entering such a place.
A few of the above questions make arguments to this point. For example, this answer says the following:
One factor to keep in mind is how close one gets to the building itself as he notes, " While church services are being held, it is clearly forbidden to enter the church’s parking lot because it may seem to a bystander that one is entering the parking lot in order to enter the church. When church services are not being held, it is permitted to cut through the church’s parking lot...
This would seem to indicate that the problem is one of appearances. Were one to enter during off-hours, or in the dark, or ensure one were to remain unseen, perhaps the rule would not apply.
This answer states that the prohibition is not against entering church grounds, but rather against entering the sanctuary proper, the specific site of non-Jewish worship:
However, it is forbidden for a Jew to enter the sanctuary of the church, i.e. where the actual prayer services are held. As it is a marit ayyin as it could be interpreted as identification with the philosophy. However, it is permitted to enter other rooms in a church for non-religious purposes.
Depending on the interpretation of the word "interpreted" (which reminds me a bit of Bill Clinton's famous "It depends on what the meaning of the word ‘is’ is"), and the reference to marit ayin, this would appear to support the notion that the problem is one of appearances, that being in a church, for example, may cause onlooking Jews to believe that it is permissible to worship as a Christian; of course it is not.
Is it then to be taken that if one were surrounded entirely by non-Jews, with no Jews present, as is very likely the case in and around a church in a mostly-secular part of the world, that it is permissible to enter a church so long as one does not take part in the worship?