Detecting an earthquake early and alerting millions of people quickly are both hard problems, and both had to be solved for this to work.
Much of the hard work on Google's side just happens to overlap with other use cases that they've already scaled.