They don't actually mention it in the movie (it gets mentioned in text at the end) But since the Dr. Examination of Sarah Winchester took place between 4/13 and 4/19 1906 you can infer that everything that happens at the end is the result of the 1906 SF Earthquake on 4/18...which I figured out earlier in the movie when the date was given since I remember the date from going to SF a couple years ago.