That’s Old Testament right There.
In the Old Testament, if God was going to destroy sinners He always announced it. I.e: a volcano didn’t just one day erupt near Sodom and Gomorrah. God first told Abraham what He was doing, and why. Then Lot and his family were told. The fiancés of Lot’s two daughters were warned also.
Jesus cautioned against citing natural disasters from a Holier Than Thou POV. Jesus’ message is that we’re all sinners, and we all need the same thing: repentance and faith in Jesus.