Shemos 20:22 [1] introduces the building of the
altar with אם (“If you make an altar…”), implying that it’s an optional
mitzvah. However, Rashi [2] cites
R’ Ishmael who says that while אם in the Torah usually refers to an
optional action, this is one of three exceptions where אם really means
כאשר (“when”) and the mitzvah is obligatory. Why then does the Torah
describe building the altar with אם rather than כאשר?
Ibn Ezra [edit]
אם does express a type of condition: building an altar will only be
obligatory if klall yisrael merits to enter the land of Israel. However,
once klall yisrael enters the land, it will be obligatory. [3]
R Gershenfeld
source needed
The אם indicates that we need to do work before this obligation falls
on us. We can’t get overly excited by the end goals that bring us closer
to Hashem (i.e., building the altar, lending, first fruits) and skip the
steps required to get there. Instead, we need to focus on the the hard
work and preparation needed to make ourselves into people who can
fulfill these mitzvot.
Gur Aryeh [edit]
Building the altar really is obligatory, but the conditional “אם”
tells us what our kavana should be. Hashem wants us to build it as
though we weren’t obligated to, because we have a desire to do so (and
would do it even if it were optional) not because “Hashem said so.” If
we build the altar only because it’s obligatory, it’s not proper avodah.
[4]
Chizkuni [edit]
The mitzvah of building the altar is mandatory, but אם describes a
condition within that obligation. Chizkuni learns that the “stones” in
the pasuk aren’t literal and encode some flexibility to build the altar
out of slightly different material, like earth. However, if the Jews do
build the altar specifically out of stones, then those stones cannot
have been shaped by metal tools. [5]