There is a concept in Judaism of “transgression for its own sake” / “aveiro lishmo”. This topic although not spoken of frequently, definitely has sources in traditional & modern Jewish thought. I would like to outline a few sources that I have found recently found that discuss this concept. (for further discussion see Major Trends in Jewish Mysticism, Gershom Scholem pg, “Holiness of Sin” page 315 – 319)
“Love and Sacrifice” Source: R. Zadok ha-Kohen of Lublin, Takkant ha-Shavin, no. 5 s.v umitzad ha-ahavah
[The Religious Thought of Hasidism by R’ Norman Lamm pg 593]
"Through love [of God] one may enter into matters such as this (ie./ to fulfill God’s will even to the detriment of one’s own spiritual well-being) by means of a “transgression for its own sake” as did Yael [who according to the Talmud, had a physical relationship with Sisera]. Though we dot not find any explicit dispensation in the Torah for this action. Rather, it is from this incident that we derive this [teaching that a “transgression for its own sake is greater than a mitzvah done not for its own sake”] 20 That is, because of her own great desire and love for the salvation of Israel. And in order to destroy such a great enemy of God as Sisera, she did not take into consideration the [gravity of the] transgression, and the foulness that he cast into here although, as the Sages say, she regarded the act as wrong. 21
Nevertheless, she sacrificed her own spiritual wellbeing 22 for this, for she though that although there was no way in which such action could be permitted, and should be punished for it, nevertheless, better that she should go down to perdition so long as an enemy of God be removed from the world thereby.
Esther acted in the same way, as we find when stated to Mordechai, and if I perish I perish (Esther 4.16) 23 That is, [she willing to risk] even the destruction of her soul, God forbid, in that she transgressed [in marrying Ahaseurus], with the intent of saving the Jewish people"
20 That is, this principle is derived not from the Torah itself, but from this incident in the Book of Judges, which describes the part Yael played in the ultimate salvation of the Israelites from Sisera. According to the Talmud in Nazir 23b, Jud 5:24, “Let Yael, the wife of Heber the Kenite, be blessed above all woman,” refers to the superiority of Yael’s action, in engaging in such relations, over the Matriarchs Sarah, Rachel, and Leah, who each urged their respective husbands to take a concubine out of jealousy (so Rashi there). Their actions thus constitute “mitzvot [done] not for their own sake,” and are inferior to Yael’s, which was a technical transgression done for the sake of bringing about the salvation of Israel.
21 That is the pleasure derived from physical relations with the wicked is unpleasant in an extreme degree for the righteous. The word zuhama, translated here as “foulness,” refers to the sin of Even and serpent in the Garden of Eden; the sepent case his foulness into Eve, and this foulness was not cleansed until the time of the Sinaitic Covenant
22 Literally, “her soul”
23This midrash seems to be amalgam of one of Esther verse in Megillah 15a, and one of the hikaret tikatet in Sanhedrin 64b
A practical illustration of this point in modern times by a figure revered by Orthodox adherents until today is the following case of the Rogatchover Gaon learning of Tishabav.
R’ Zevin’s Ishim v’Shittos pp. 91-92:
"All his days were an unbroken chain of Torah study. His mouth literally never ceased speaking Torah in the simplest sense, not as a metaphor. They say that it is for this reason that he nver had his hair cut and would grow them wildly, so he should not need to sit for that time with his head uncovered and cease Torah study. Even on 9 Av he would speak Torah withoutletup. He would usually be 9 Av in his birthplace, Rogatchov, because during those days fell his father’s yahrzeit, for which he would come from Dvinsk to Rogatchov. All the people of the city, great and small, would come to greet him and converse with him, and he would spend the fast talking divrei Torah with them. Furthermore, when his first wife died in Warsaw and the gedolim of the city came to be menachem avel, he would lecture before them for hours in Torah. None of the consolers dared to remind him of the aveilus. His uncle, however, once noted this to him and he responded:
"’Certainly, this is an avira, and when I get punished on my other sins they will punish me on this sin as well. But I will accept the punishment on this sin with love and will, and the Torah is worth being punished over it..’"
[http://www.aishdas.org/avodah/vol01/v01n019.shtml#17 by R’ YGB (http://rygb.blogspot.com)]
An interesting idea that I have not seen anyone make the connection to, is that of zealotry as an "aveira lishmo". The follwing source gives expression to this idea [http://www.halachabrura.org/parsha-e.htm]
“The Gemara says that if a zealot asks Bet Din if he should kill the sinners, they deter him. The Rosh infers from this that there is no mitzvah to kill them, only permission. But the Ran holds that it’s a mitzvah, only Bet Din does not tell anyone to carry it out, because the mitzvah is only for “zealots”, and the fact that someone asks shows that he isn’t a zealot. “ ("Pinchas One who lies with a non-Jewess – Zealots kill him" based on Birur Halacha, Sanhedrin 82a)
My thought process on the above source was as follows:
Surely a person is bound to following the ruling of the beis din in a situation where a psak has been giving[?]. How can it be that this man has fulfilled a mitzvah by killing the perpetrator, but yet if he had stopped to ask the beis din the question, his act would have been forbidden, possibly a sin[?]
I hope the readers can provide some insight into this enigmatic aspect of our tradition.