Good info in this thread! It varies so much around the country. I see on those TV shows California can make you tear out unpermitted work.
They are fairly strict about permits around the Chicago area, but they admit they can't control what people do to the inside of their homes. For anything visible you may as well get a permit. If your contractor says "we don't need no stinking permit, you just hired a hack. DIY'ers around here avoid permits because it raises your property taxes. My property taxes increased about $130 a year for the privilege of having a permitted $2000 wooden deck (1994 dollars). It amounts to a 100% tax over the life of the deck. This is unusual, but I live in an area with one of the highest property tax rates in the nation (3.4%).
When it comes time to sell, it's up to the potential buyer and the home inspector (if they hire one) to find hackery. If the buyer wants to be a ****, he can seek out any permits that were pulled over the years. It has killed deals according to my realtor friend, but it is very rare. If someone wants your house, they generally aren't out to piss off the seller.