Well, so much for religious belief, but, consider this: If one accepts the idea that G-d created the universe, a place of inconceivable magnitude and complexity, it would be a breeze for Him to create and manipulate the fabric of any part of creation in any way He might desire. We call this a miracle. According to most Jewish bible commentators, the Ark, like the flood, was a miraculous vessel, quite capable of serving its purpose of preserving human and animal life.
I’m not preaching, just addressing the internal logic of the Bible and those who take it literally.
It would also be a breeze for Him to make dragons, fairies, trolls magic carpets, etc...but that doesn’t mean He did.