Avodah Zarah 12 - In a City of Idolaters
If the inhabitants of a city are holding a festival in honor of their local deity, one is allowed to do business outside the city. If the festival is outside the city, one is allowed to do business inside of it. We can assume that the people of one place do not acknowledge the deity of the other place.
Can a city where a festival is being held be visited? - If the road leads only to that city and to nowhere else, it is forbidden, because it gives the appearance of going to the festival; otherwise, it is permitted.
A thorn should not be removed from one's foot in front of an idol, nor should one collect his money scattered in front of an idol. Instead, one should first turn to the side, so as not to give the appearance of bowing down to that idol.
Both rulings are necessary. The thorn can be removed elsewhere, but one might have thought that money is allowed to be collected. Conversely, one can loose some money, but one might think that removing a thorn, which is painful, would be allowed. The ruling informs us that both actions are prohibited.
Art: Léon Bonnat - An Arab removing a thorn from his foot