The Lord gave Adam the means over the animals of the earth. (that means they were already here). The sin began shortly after and we all know that outcome.
Go back further.
Heavens and Earth, Earth without form and void.....dust cloud/disk orbiting the proto-sun........sun ignites, day divided from night......Earth cools, water forms.....you get the drift, eh.
So, how did the authors of the Torah know?
How many parents have said that to smart mouth teens..The kids then find out how good they had it at home, no bills to pay, didn't need a job to get food to eat etc etc etc. Some try to come back home, but smart parents say I love you but make it on your own....you do help your kids only when necessary. Even the mother bird kicks out her babies at some point and learn to fly on their own...Thats the way it is in all of nature...