It is not uncommon to hear people define a mitzvah as a “good deed”. And there is little doubt that many mitzvot are, in fact, very good deeds. Yet as the Hebrew word indicates, a mitzvah means “a command”. Yet like all translations, the word “command” does not quite capture the definition of a mitzvah. Whereas a command implies something we must do, there are many mitzvot that are obligatory only if we find ourselves in a given situation.
At times, it is laudatory—but not obligatory—to put ourselves into such a situation, and at other times, there is no reason to do so. Falling into the former category would be the wearing of a four-cornered garment so that one can fulfill the mitzvah of tzitzit. The much larger latter category is comprised of such actions as having a flat roof in order to fulfill the mitzvah of putting a fence on one’s roof; going bird hunting in order to fulfill the mitzvah of shiluach hakan; searching for lost objects to fulfill the mitzvah of hashavat aveidah, or—in a move that would surely help the mitzvah count—becoming a farmer to fulfill so many mitzvot.
These are beautiful mitzvot that one should and must fulfill if the opportunity arises. And that is what makes them so special. They are observed when going about one’s natural routine, and they require us to pause and take the time—even if it may be inconvenient—to fulfil our obligations. If and when the opportunity arises, we fulfill the mitzvah, but if not, there are a multitude of other opportunities the Torah gives for mitzvot. “The Holy One, Blessed be He, wanted to grant merit to the Jewish people; therefore, He multiplied for them Torah and mitzvot” (Makkot 23b). The simple act of greeting someone with a hearty “Good morning, nice to see you” is a fulfillment of veahavta lereacha kamocha—a mitzvah that Rabbi Akiva says is the most fundamental in all of Torah (Yerushalmi, Nedarim 30b).
It is for this reason that the Torah introduces the mitzvah of shiluach hakan—for which we are promised long life—with the phrase ki yikra, “if, perchance”, you come across a bird’s nest and happen to want to take the chicks, then send away the mother bird first. It is the mitzvah of peace, "bakesh shalom veradfeihu, seek peace and run after it”, that we must pursue—something much more important than spending our time looking for birds.
In addition to these “situational mitzvot”, there are those mitzvot that it is better to entirely avoid. “Mitzvot” such as granting a divorce, marrying the woman one seduces, or even fulfilling a vow are mitzvot best avoided, with the mitzvah kicking in only after we have reached a place where it is best not to go. The mitzvah is no more than a mechanism to make the best of an unfortunate situation.
Then we have the notion of a “mitzvah kiyumit” for an action that we are not commanded to do, but for which we fulfill a mitzvah if we do. This includes eating matzah or sitting in a sukkah beyond the obligatory first night. This is different than tzitzit when, while we may not need to wear a four-cornered garment, if we do so, we are obligated to put in tzitzit.
Whether settling the land of Israel is a mitzvah one is obligated to do or one that is most laudatory, but not obligatory, has long been debated by rabbinic authorities. Of course, practically speaking, this should matter little. We are required to do that which is right, regardless of whether it may technically qualify as a mitzvah.
And then we have mitzvot where the Torah gives us a choice of which mitzvah we might like to do. And this brings us back to masechet Bechorot.
The mitzvah of peter chamor requires that we redeem a firstborn donkey by giving a sheep in its stead to the kohen. However, if one prefers, one can choose an alternative mitzvah and one can slaughter the donkey, thereby exempting oneself from giving a sheep to a kohen. Why one would want to do this is not clear; it could be to save a few dollars, or perhaps he has something against kohanim, or maybe he is stranded on a desert island somewhere and there is no kohen to receive a sheep, or for no reason at all. While he is entitled to do so, the Mishna (Bechorot 13a) teaches that it is preferable to give a sheep to a kohen rather than kill the donkey.
The Mishna goes on to teach that we have similar choices regarding two very different types of marriage: that of a maidservant and that of a sister-in-law. In one of the saddest portions of the Torah, we learn of the laws of a father who sells his daughter into slavery. That one could be so desperate for some money as to see the only hope for his children in having them taken care of by a wealthy “slave owner” is not only a personal tragedy, but a blight on a society where such is necessary.
The Torah demands not only that a slave be treated as a member of the household—eating the same food, having the same sleeping accommodations, and observing the same Shabbat—it highly recommends that the master, or his son if such is more appropriate, marry her. “The mitzvah of yiud, of marriage, takes precedence over the mitzvah of redemption”. By doing so, instead of being purchased—twice, no less—this slave becomes a wife.
The Mishna then notes that the mitzvah of yibum, levirate marriage, was preferred to that of chalitzah, freeing the widow to marry others. The Torah clearly wants the brother of a deceased man who left no children to marry his widowed sister-in-law and carry on the name of his brother. The Torah allows chalitzah but the fact that the Torah instructs the woman to spit at the man who does so and declare, “This is what we do to the man who does not build his brother’s home” (Devarim 25:9), tells us all we need to know.
But in a somewhat surprising statement, the Mishna backtracks and says, “Since nowadays, people do not have intention for the mitzvah [of carrying on his brother’s name], they said that the mitzvah of chalitzah takes precedence over the mitzvah of yibum.” Considering that lishma, proper motivation, is not required in order to fulfill a mitzvah, this statement is somewhat puzzling. And we have no such statement to the effect that, if a master and his maidservant do not intend it for the mitzvah, it would be better for him not to marry her.
The mitzvah of yibum is akin to an oxymoron. Marrying one’s sister-in-law carries with it the penalty of karet, excision. The many prohibitions of marrying close relatives are present because the Torah considers such abhorrent. Whether that person was previously married or had children is not relevant. For good reason, one cannot divorce one’s wife and marry her sister, or marry one’s aunt. Is there any reason it should matter if there are children involved?
The Torah was willing to allow what would otherwise be a most serious violation of its laws because, and only because, it considered it so important to have the name of the deceased carried on. This may involve great sacrifice by both the brother and sister-in-law, marrying someone for whom they may have little love, and if the man is already married (recall that in the Torah, polygamy is allowed), tremendous self-sacrifice from his wife. But the great act of sacrificing for one’s brother allows one to marry the otherwise prohibited. Yet if one is going to “sin”, one had better ensure one’s motivation is spot-on.
This is akin to the concept of aveirah lishma, a sin that—under rare circumstances—is allowed, provided one has the best of motivations. The Mishna asserts that since so few are capable of such, it’s best to recommend that no one perform yibum. Taking this a step further, Abba Shaul teaches that, “One who consummates with his yevama for the sake of her beauty, or for the sake of marital relations, or for the sake of another matter, it is considered as though he encountered a forbidden relation, and I am inclined to view the offspring as a mamzer” (Yevamot 39b).
It is just plain arrogant for most to claim that they have high levels, or even basic levels, of proper motivation. It is for this reason that one must say kriat shema on one’s wedding night, against Talmudic law (Brachot 16b). The Talmud asserts that it would be the height of arrogance to claim that one can be thinking of “accepting the yoke of heaven” on one’s wedding night and hence, one is exempt. The Tosafists (Brachot 17b, s.v. Rav Shisha) note that nowadays, it would be great arrogance to claim that one is thinking of “accepting the yoke of heaven” on every other night, something that is implied by skipping it on our wedding night.
Having the right motivation and intent in the performance of a mitzvah is a most difficult task. But the harder we try, the more successful we will be.
 An interesting example—one disputed by most—is the chidush, novel insight, of Rav Yosef Babad, the 19th century author of the Minchat Chinuch. He argues that it is a mitzvah to ensure that one owns chametz on erev Pesach so that one can fulfill the mitzvah of tashbitu, getting rid of our chametz.
 With thousands upon thousands of acts qualifying as Torah mitzvot, we will, please G-d, discuss the significance of being included in the “613 mitzvot” of the Torah before Shavuot.
 Lishma, proper motivation, is not to be confused with kavanah, proper intent, which at times is absolutely necessary.
 The Mishna recommends against, but does not prohibit, yibum. That was left for later authorities, at least as far as the Ashkenazic world is concerned, based on the teaching of Abba Shaul, above. See Shulchan Aruch Even HaEzer 165:1; the Shulchan Aruch rules like the sages, while the Ramah rules like Abba Shaul.