"Ki tivneh bayis chadash v'asisa ma'akeh l'gagecha". The Torah presents the mitzvah of ma'akeh, the command to build a fence around a roof or dangerous obstacle, as a necessary task when building a new home. However, the halacha is that even if one remodels an old home, or moves into an old home that lacks a proper fence, one is still obligated in the mitzvah of ma'akeh. Why does the Torah place the mitzvah specifically in the context of building a new home? The Netziv explains that the Torah is sending us a mussar lesson. Building and moving into a new home is an auspicious occasion, and it is only fitting that such an occasion be used not just move furniture and the appliances, but to do mitzvos. Ma'akeh is a way to seize the opportunity to lay such a mitzvah foundation.
But why teach this lesson using the example of ma'akeh? I would guess that only a small minority of homeowners have actually had the opportunity to perform the mitzvah of ma'akeh. Yet, every single owner of a new home has the opportunity to perform a different mitzvah -- the mitzvah of mezuzah. Why does the Torah not make the point that a new home should be established through performance of mitzvos by using the illustration of mezuzah?
The Netziv switches hats to halachic analysis to answer this question. He suggests a fundemental difference between ma'akeh and mezuzah: there is a prohibition of living in a home which does not have a ma'akeh installed; however, there is no prohibition of living in a home without a mezuzah. Such an argument is easy to digest if one accepts that ma'akeh is a lav while mezuzah is only a mitzvas aseh (as the Rambam holds) , but the Netziv goes a step further and makes his argument even according to Tosfos (Kiddushin 36) who holds that the lav of ma'akeh can be avoided so long as one intends to build one at a later time. Given that both ma'akeh and mezuzah are mitzvos aseh, why should there be a distinction? The Netziv explains (and further elaborates in Ha'amek Sh'eilah 126:7) that the mitzvah of ma'akeh is a prerequisite to moving into a home. However, the mitzvah of mezuzah is incumbent upon the resident of a home, i.e. the mitzvah does not take effect until after one has moved in. Ideally, one should perform the mitzvah of mezuzah immediately afterwards, but if one is prevented from doing so for whatever reason, one is not required to move out. In a nutshell, fulfillment of ma'akeh is a necessary condition of setting up residence; setting up residence is a necessary condition of becoming obligated in the mitzvah of mezuzah. Similar words, but very different outcomes. Moving in without a ma'akeh is an active violation of a mitzvah. Moving in before affixing a mezuzah merely establishes acondition of residence; the contination of that state of residence without a mezuzah is a passive violation of the mitzvah which should be performed.
This chiddush of the Netziv helps answer a question raised by R' Akiva Eiger (Shu"t Mh"K #9). R' Akiva Eiger asks why is it that every person who goes on an extended trip (e.g. spending the summer in a bungalow colony) does not make a bracha on the mitzvah of mezuzah when re-establishing residence in one's home? The implication of the question is that the act of taking up residence is what generates the obligation to affix a mezuzah, and hence when that act recurrs, a new obligation and new bracha is required. According to the Netziv, this is not the case at all. The act of taking up residence is not a mitzvah act; it is just a means to establishing a condition necessary for the mitzvah of mezuzah to then take effect. Once residnce is re-established, one cannot remain in a passive state without a mezuzah affixed to one's door, but since the mezuzah is already up, such a condition is automatically avoided. No new mitzvah occurs, and no new bracha is required.