If you have a contract to buy or sell a home, it is a contract. Also, when selling a home, there are disclosure laws. "Changing your mind" is not a valid reason to get out of a contract.
I haven't watched this episode in at least 20 years. If I recall correctly, the buyers amicably agreed to let Mike and Carol out of the contract when it was discovered that the kids didn't want to move. The unanswered question was if the real estate agent made Mike and Carol pay the real estate commission that was owed for finding the buyers.
If the buyers didn't buy the house because they thought it was haunted (assuming a haunted house is a material defect) and then bought another home that they didn't like as well, if they later discovered that the kids were pulling a prank, could that be considered fraud?
Lastly, someone posted a trivia question about the Jack-and-Jill bathroom and I couldn't figure out how to respond directly to that. So I will respond here. Mike built the house for a family with 3 boys, not 3 boys and 3 girls. That is why they were moving. Very few homes since 1929 are built with the intention of 6 children living there. I take my Brady Bunch episodes very seriously.