There are various areas in the Gemara where there is discussion about natural events, often appearing like a tangential discussion. Some examples are in Bechoros 7-8 or Pesachim 94. I understand that many halachic or historical topics are arranged in this tangential manner, but what is the reason for including hypotheses about science? If someone thought thunder is caused by lightning breaking apart balls of hail and another thought shooting stars were rips in the firmament that let the light from behind it through or another argued that the Greeks were wrong about the duration of a viper's gestation or another suggested the sun travels West to East behind the firmament at night, why include their suggestions on such subjects? (Note that I'm not asking about areas where there is actual halachic implications to the topics as with discussing if Tamei fish lay eggs or what time of day a chicken can lay an egg.) It appears that including such discussion risks opening it up for criticism about the Rabbis' knowledge, so there should be some positive purpose for including it.
According to the Maharal, amongst others, literal readings of non-Halachik Talmudic or Midrashic statements are incorrect and indeed Chazal are not discussing natural phenomena at all. Rather, they are discussing fundamental metaphysical realities and theology at a level that requires a deeper understanding of their language and philosophy (See, e.g., Maharal Be'er HaGolah Be'er 6 where he discusses e.g. the passage in Pesachim you cite; See also e.g. Maimonides' Introduction to Commentary on the Mishna and Vilna Gaon's commentary on Mishlei 1:3).
There is a letter from Rabbi Hirsch found here http://www.mesora.org/hirsch.html now printed in the ninth section of his collected writings.
This letter deals with statements of Chazzal which deal with their view of sciences and seem bizarre to the modern mind.
Here's two excerpts:
Sages of Torah, not Masters of Science
In my opinion, the first principle that every student of Chazal’s statements must keep before his eyes is the following: Chazal were the sages of G-d’s law - the receivers, transmitters, and teachers of His toros, Hismitzvos, and His interpersonal laws. They did not especially master the natural sciences, geometry, astronomy, or medicine - except insofar as they needed them for knowing, observing, and fulfilling the Torah. We do not find that this knowledge was transmitted to them from Sinai.
Later he says:
The Talmud in Bova Kama declares “A human spine, after seven years, turns into a snake; this applies only if he did not kneel atModim. “ Anyone who reads this finds it laughable, but Pliny says the same statement almost word for word, “After a number of years the human spine turns into a snake.” Chazal, however, used this to teach a mussor lesson. To any mind it is clear that every similarly surprising statement of Chazal, if we look into it, was accepted as true by the scholars of the time.
So there are two important lessons Rav Hirsch is pointing out from these Chazzal. One, don't ignore the reality as explained by contemporary scientists, deal with it. Two, the lesson learnt is the point, not the lesson plan or the message used.