Tzaraat on a house (14:33-57) can easily be recognized as a supernatural occurrence. It must, therefore, have a purpose. The common explanation, that of the Sifra and Vayikrah Rabbah (cited by Rashi to Vayikra 14:34), is that once the inhabitants of Eretz Yisrael realized that the Jews were going to conquer the land, they hid all of their valuables in the walls of their homes. In order for the Jews to find this wealth, Hashem placed Tzaraat on the walls of the houses. When the Jews were forced to cut away the offending stones (14:40), they would find the hidden treasure.
Rambam (Hilchot Tumat Tzaraat 16:10), on the other hand, takes an entirely different approach. He explains that Tzaraat on the house is a punishment for gossip and selfish behavior. As a punishment, Hashem first puts Tzaraat on the house. If the sinner does not take the hint, Hashem places Tzaraat on his/her clothing. If the person still does not repent, then Tzaraat is placed on his/her own body. Rambam’s source is the Gemara’s explanation of Pasuk 35 (Yoma 11b). The Pasuk, describing the procedure for determining whether the house has Tzaraat or not, says, “UVa Asher Lo HaBayit,” “And the one to whom the house belongs shall come.” The Gemara explains that the person’s sin was calling the house “his” and no one else’s, declaring that even Hashem has no ownership of it. The Tzror HaMor comments that such a person is practically a heretic. Because of his selfish feelings, if someone wanted to borrow something, this person would claim not to own such an item in order to avoid sharing with anyone. By placing Tzaraat on the house, Hashem forces the person to bring all of his belongings outside so everyone can see what he really owns and how selfish he actually is. The person should have realized that Hashem can just as easily take away as give, a fact that everyone needs to keep in mind.