The belief that God needs to destroy the majority mankind in order to bring a new era of purification is one of the oldest superstitions in human history. It can probably be traced back hundreds of thousands of years to when humans did not understand events such as flash floods, volcanic erruptions, and earthquakes. To the primitive, superstitious mind, it was believed that divinity was expressing his anger toward mankind for some immagined sin they had committed. This was probably why the concept of animal and human sacrafice took hold.
These superstitions were carried forward into the first civilizations and were then put into writing. In the early, Mesopotamian mythologies, the gods were depicted as erasing a wayward human race in order to correct the world, and bring about a new, purified world which was more to the god's liking. Early mythologies are filled with tales of humans constantly frustrating the plans of the gods. These tales were later adopted into the Old Testament to explain Israel's origins and relationship to the surrounding world. Noah's flood was recorded as God cleansing the earth of humans who frustrated him, and to save the tiny number of those he found favorable. Thus, the belief was forever etched into the Biblical tradition that God must destroy most of the human race in order to save it.
It is important to see how the early gods were depicted as beings with limited intellects, and human frailties such as jealousy, and rage. These gods, according to Sigmund Freud were merely the subconscious projections of the human psyche itself - a dualistic mind that contains love and peaceful attributes, with a jealous and angry alter-ego. Yes, these depictions found there way into the Old Testament as well.
This concept God has been carried over into today. Many religions still believe in this big cosmic parent in the sky who bestows favors, and punishes individuals by smiting them with diseases and death.
It is rather unfortunate that the book of Revelation was adopted into the Christian canon. It is probably one of the worst pieces of literature written in human history; not only for it's violent and sociopathic depictions God, but also for the far-reaching consequences it has had into our modern day. Look at how many irrational fundamentalist churches and cults rely on the book of Revelation for many of their twisted Ideologies.
Unfortunately, many of us are carrying around ancient superstitious depictions of a limited and anthropomorphic God that were passed down to us by our early ancestors who didn't even know that the earth was round.