The major evil that people do is when they think they are doing a mitzvah.

The Satan is disguised  in Mitzvas.
This concept is also mentioned by the Geon from Villna.

The basic idea is that we  find that the evil inclination does not try to seduce a person into sin by openly advertising what his intentions are. Rather he says, "Come, and let's do a mitzvah." But mitzvas are highly dependent on the particular Halacha [Jewish Law] that apply to any given situation.  nowadays we should no longer call the evil inclination by its common names ["Satan", or the "evil inclination" etc.] but rather call it the name of "Dimion"/"imagination". [דמיון] That means to say:  the major evil that people do is when they think they are doing a mitzvah. [If people would settle for being selfish jerks, we would all be better off than having people that are out to save the world.]

The idea that "the Satan dresses himself in Mitzvot"  Also, many times the Satan will come to you and ask you to do some actual mitzvah. This is another case of the Satan being dressed in Mitzvot.

That being said, we all should learn Torah [i.e. the Old Testament, Talmud and its commentaries, the Zohar, Isaac Luria]. That fact is not the issue here.
Rather the issue is sometimes something seems like a mitzvah when it is not. There are an infinite number of factors which can make this happen. For example the situation is not parallel to the situation the Shulchan Aruch or the Rambam is talking about. That is: there is a mistake in the material facts of the case. Or there is a mistake in understanding the actual Halacha.
Reb Joseph Karo made this point in his commentary on the Rambam. He wrote that people dot understand the Rambam because they don't know the sugia in the Talmud from where the Rambam derives his law.  And the same idea was stated by the Maharshal and the Maharsha about the Shulchan Aruch. The Maharsha said it is proper to rebuke people that decide halacha from the Shulchan Aruch without knowing the sources.