Its not illegal, its a "sham" (which is to say the house is worth much more than $1 and the sale has an ulterior motive). Similarly car sales where the car costs $1 but the "handling" charge is $15,000. The sham is that you pay sales tax on the sale price (that was fixed by paying sales tax on the blue book price but I digress).