One hundred and twenty years before G-d brought the great flood, he instructed the righteous Noach to begin building an ark. G-d provided Noach with the size and specifications of the ark.
The reason G-d had Noach work for such a long time on the ark was so that people observing him working on this project would ask what the purpose of the ark was for and Noach would tell them that G-d is upset with mankind’s immoral and unethical conduct and if mankind would not change their sinful ways He will be bringing a flood to destroy all living beings and plant life.
Noach was steadfast in his work and his warnings fell upon deaf ears. When society’s adulterous behavior and thievery became so rampant, G-d brought the flood and wiped out the world.
The only humans who survived on the ark were Noach, his wife Na’ama, their three sons Shem, Cham and Yefes and their wives. Each of the animal, fowl and insect species came into the ark with their mates. Additional Kosher species of animals entered the ark so that Noach would be able to sacrifice after emerging from the ark.
Once the door of the ark was closed and the floodgates opened they were at G-d’s mercy. There was no port to land the ship – the entire globe was covered by water. During the twelve months of inhabiting the ark, Noach and his family worked day and night feeding and tending to the animals’ needs.
They continually felt the turbulence and suffered from their exhaustive work. During this experience says Rabbi Zalman Sorotzkin o.b.m. Noach and his family became completely righteous – and their emergence as righteous people had an indelible impression on the new world.
One reason G-d destroyed the world specifically by water is because at the beginning of creation the world was covered with water. On the third day of creation G-d commanded the waters to expose the land. When the world was no longer worthy of existing – it went back to its original state of water.
In fact, the Medrash tells us that when the angel of the waters noticed the ark, it became mad and wished to sink it. G-d sent a calming spirit over the waters and spared the ark from submersing.
G-d destroyed the world because promiscuous behavior was rampant and thievery was widespread.
Reb Zalman continues. Because of these two sinful behaviors, G-d had the occupants of the ark comply with two behaviors. Firstly, G-d instructed Noach together with his sons to enter the ark, and then the wives. From this our Sages derive that they were forbidden to be intimate while on the ark. The male and female animals were held separately as well.
Since they were the ones repairing the world from sinful sexual behavior, their process of restarting the world began by refraining from intimacy during the duration of the flood. This made an impression on the new world, for after the flood, society lived with guidelines to stay away from adulterous behavior.
Astonishingly, the animals also had to abide by abstinence because before the flood they began mating with other species. Our Sages tell us that the widespread sinful human behavior affected the animals causing them to change their instinctive impulse to mate only with their own kind. After the flood they remained loyal to their own kind.
To counterbalance the prevalent thievery and robbery of the generation of the flood, Noach and his family were busy 24/7 for an entire year doing kindness for every single animal. After the flood the world was restored to it original state of ‘Olam Chesed Yibaneh – A world created with the precepts of Chesed.’ The occupants of the ark reestablished the world with Chesed and its repercussions are felt even today.
The first thing Noach did after leaving the ark was to offer sacrifices of thankfulness to G-d for sparing him and his family. G-d accepted the offerings and then vowed never to bring a flood that would destroy the entire the world.
Noach was not successful in correcting the ways of the people before the flood, but when the inhabitants of the ark emerged they built and influenced the new world to be a better and elevated place than before the flood.