Rashi quotes the Mechilta where Rabbi Yishmael says: Every example of im (usually translated as if), in the Torah is referring to something which is optional, except for three times. The first of them is the above pasuk in which the im is not discretionary, but rather, translated as “when” you will build an Altar; the second instance (Shemos 22:4), is concerning lending money, im kessef talveh es ami, “if” you lend money, would be the incorrect translation since one must lend money. Hence, it is read “when” you will lend money. Last, is v’im takriv Minchas Bikurim (Vayikra 2:14); the pasuk cannot mean “if” you will bring a Minchas (meal-offering) of Bikurim, since the Torah is referring to the Minchas Omer which is an obligation. Apparently, these three cases of “im” are not conditional, but rather, absolute, and therefore the interpretation of im is “when”. While this is all good and well, why would the Torah employ a word that implies discretionary when, in fact, it is an obligation? Mizbayach, lending money and Minchas HaOmer are obligatory; why use a term that implies conditional?
Horav Zev Weinberg, Shlita, explains that there are many activities which are obligatory in nature, but should nonetheless be carried out in such a manner that it appears that the individual is doing it out of a sense of option and generosity. This is especially true with regard to acts of kindness, which are albeit compulsory, but should be expressed with love and a desire to assist someone in need. When there is an appeal for assistance, and a person writes out his check as if he is about to take some bitter medicine, it takes away from the beauty and spirit of the mitzvah.
Likewise, when one offers his first fruits to Hashem, it should not be brought as something requisite, but out of a feeling of excitement – expressing one’s good will and joy in being able to give back and express his gratitude to the Almighty. Similarly, when one builds a Mizbayach upon which he will bring his offerings to Hashem, it should be with a sense of beneficence – not compulsion.