From Chabad.org: More blessings: An overabundance of crops and G‑d’s presence will be revealed in our midst. This section then describes the severe, terrifying punishments which will be the Jews’ lot if they reject G‑d’s Mitzvot. The punishments include disease, famine, enemy occupation of the land, exile, and desolation of the land. The non-observance of the Sabbatical year is singled out as the reason for the desolation of the land. The Aliya concludes with G‑d’s promise never to utterly forsake us even when we are exiled in the lands of our enemies.
Rashi explains that these curses will only apply if we actively reject and rebel against the commandments and the study of Torah, and despise those that do perform them. In essence, it would be denying the very first commandment that G-dis the Omnipresent creator. It seems obvious that should all these horrible things happen, it would be pretty clear that G-d really is the Omnipresent creator (we were warned, and the threats came true), which would lead us to affirm the first commandment again. Simple cause and effect, really. It turns out that these horrible things are threats, just proofs that G-d exists and can exert his presence if we forced him to.