The state is spending billions to guard its borders against foreign adversaries, while leaving its own citizens stranded when the earth beneath them gives way.