You're completely right. Earthquake codes save lives, but in liquefaction zones, the structures may be unlivable afterwards even if they're completely intact.
The point of earthquake codes is not that the buildings are livable in afterwards, in fact in Christchurch something like 30% of all buildings had to be demolished. The point is that they stay up long enough for rescuers to get in, and if they do collapse they collapse with survival cells rather than pancake. In Christchurch the buildings performed very well with exception of the CTV building which pancaked. Although I know that a few buildings were only seconds away from collapsing so we were very lucky.