DURHAM, North Carolina — New York City’s experience a year ago with Hurricane Sandy, in which subway tunnels and skyscraper basements in Lower Manhattan were flooded, demonstrated the mistake of locating critical infrastructure where it can be inundated and rendered inoperable. In New Jersey, coastal communities were devastated, raising the old question of why people build so close to the ocean.

In Sandy’s wake, more than a few people asked why engineers and regulators allowed such seemingly irrational behavior, as if they were to blame for the hurricane’s devastation. Better engineering could have saved America billions, we’re told. But the question is much more complex. Decisions about design and engineering are informed by a host of factors, not all of them obvious — but all of them quite rational.

The first thing to realize is that any sort of cost-benefit analysis involves more than money and greed. Benefits can include such intangibles as aesthetics and quality of life. Some people are simply willing to accept the risks that go with keeping the machinery in the basement and having the benefits of an ocean or river view. In fact, the latter may even build their houses less substantially, recognizing that they may have to rebuild someday.

The phenomenon is not restricted to the domestic scale. Take trains. In Manhattan, the earliest rail-based mass transit were elevated lines. These rickety structures were relatively cheap and did not flood, providing what seemed like a win-win on one cost-benefit scale.