The undersea shocks — sometimes only minutes apart — led thousands of residents and workers to flee.