The story of Noah's ark is not the only flood story in the world: There are many. The story of Deucalion and Pyrrha is the Greek version. Like the version from the Old Testament, in the Greek version, the flood is a means to punish mankind.
Warned by his father, the immmortal titan Prometheus, Deucalion built an ark to survive the coming Bronze Age-ending flood that Zeus was sending to punish mankind for its wickedness. Deucalion and his cousin-wife, Pyrrha (daughter of Prometheus' brother Epimetheus and Pandora), survived for 9 days of flooding before landing at Mt. Parnassus. All alone in the world they wanted company. In answer to this need, the titan and goddess of prophecy Themis cryptically told them to throw the bones of their mother behind them. They interpreted this as meaning "throw stones over their shoulders onto Mother Earth," and did so. The stones Deucalion threw became men and those Pyrrha threw became women.
Deucalion and Pyrrha settled in Thessaly where they produced offspring the old-fashioned way. Their two sons were Hellen and Amphictyon. Hellen sired Aeolus (founder of the Aeolians), Dorus (founder of the Dorians), and Xuthus. Xuthus sired Achaeus (founder of the Achaeans) and Ion (founder of the Ionians).