Ches Adar, 5775
A certain Jew once wanted to help a fellow Jew in a predicament by visiting the local coffee shop on Shabbos, which was frequented by a certain individual who might be able to provide assistance. However, this coffee shop was a central point for numerous merchants and businessmen, and the Jew wondered if he was allowed to enter on Shabbos, when bystanders would suspect him of engaging in business matters on this day. On the other hand, he would be entering for the sake of a mitzvah, to help a fellow Jew. Does performing a mitzvah override the obligation to avoid actions that will arouse suspicion (see Shekalim 8a)?
This question was posed to R. Avraham Menachem Steinberg (1847-1928), the rov of Brody. R. Steinberg quotes numerous sources that can possibly shed light on this question. One source is the law that one may not run when leaving shul, because it makes it appear as if attending shul is a burden (Berachos 6b). However, some say that one may run for the sake of a mitzvah-such as to return quickly before the minyan will reach kedushah, or to study Torah in a beis midrash-and this overrides the fact that he will be suspected of transgressing this halachah (see Magen Avraham Orach Chaim 90:26).
On the other hand, R. Steinberg cites another source that appears to indicate that preventing suspicion is more important.
According to R. Eliezer, one may carry a knife in the street on Shabbos to perform a bris if the knife was not prepared beforehand. The Mishnah continues that there was a time when a Roman decree prohibiting bris milah was in effect. In such a situation, the knife should be covered before carrying it outside so that it will be hidden from view. The covering of the knife should be done in the presence of witnesses. This will prevent people from suspecting him of desecrating Shabbos, as the witnesses will testify that the carrier is transporting a knife for a bris and not something else (Shabbos 130a). At first glance, this gemara can serve as a proof that one must prevent suspicion even when performing a mitzvah.
However, R. Steinberg refutes this proof: in this case it is possible to prevent suspicion by covering the knife in the presence of witnesses; but if no other option is available, perhaps performing the mitzvah takes precedence.
Another source can demonstrate that performing a mitzvah (or care to avoid performing an aveirah) overrides preventing suspicion. A story is brought down in Sefer Chassidim (§622), in which Shimon asks Levi for advice in a proposed match between Shimon's daughter and Reuven's son. Levi knows that the match was not ideal, but he nonetheless gives his approval. His rationale is that if he would say what he really believed, people would suspect him of disapproving the match because he desired Reuven's son as a husband for his daughter. When Reuven finds out what had happened, he criticizes Levi, saying that he should not have transgressed the prohibition of lifnei iver-offering improper advice-even if the intent was to avoid suspicion.
(Shu"t Machazeh Avraham Vol. 2 Orach Chaim §12)