It is no surprise to many that animals have better instincts than humans. People rely on technology so much these days that they are not even in touch with their natural instincts to the extent that they could be. Animals actually have stronger instincts than people, due to their stronger connection to nature and wildlife.
Dogs are known for their keen sense of smell, as well as their ability to sense weather phenomena before they are about to happen. Dogs often get nervous before storms, and they can tell before any humans when there is going to be a natural disaster, such as an earthquake or tornado.
Though it has been heavily debated whether or not dogs can predict earthquakes, there is some evidence that they can, based on the reactions of individual dogs before earthquakes were about to happen. In this video, a dog is lying on the floor, and suddenly just dashes out of the room as fast as his legs can carry him. Soon afterwards, it is obvious that there is an earthquake starting, and all of the people start running out of the room.
It definitely looks like this dog could tell that something was about to happen, and he reacted accordingly. He could sense the earthquake that was about to take place, and he panicked because of what he was sensing. One can argue that there is no proof that this is why he was running, but it definitely seems like the most plausible explanation.