Much of it is down to the perception of imminent threat, with actually having the money to pay for measures to circumvent it being the next most important factor. Neither of those really existed in Haiti, or South East Asia. (The implication in the original article that the South East Asians weren't all that smart staying on the coast is pretty insulting when you've seen what the infrastructure on the SE Asian coast is actually like.)
Insurance companies can coexist perfectly with lax building codes so long as the market can bear higher premiums - if cost of damage multiplied by probability of earthquake over a time frame is lower than the increased cost of construction or remedial work then nothing gets done. Engineer cartels and political will to avoid preventable casualties at all costs are more important in saving lives here than the free market.