"By their families." And not they themselves; for all the men and the women went out, but as for the cattle and the wild beast, their offspring went out and not they themselves. And this is what is written, "by their families." "They went out of the ark." Upon this condition they went out: that they should not mix their seed with a species that is not their own.
Why the Animals Left Noah's Ark by Their Families
Midrash Aggadah, Genesis 8:19
למשפחותיהם. ולא הם כי כל האנשים והנשים יצאו ובהמה וחיה יצאו בניהם ולא הם, והיינו דכתיב למשפחותיהם: יצאו מן התיבה. על מנת כן יצאו שלא יערבו זרעם במין שאינם שלהם: