The Mishna (95a-b) at the beginning of the perek discussed what to do if someone comes across a pile of tefillin that cannot be transported inside by wearing each pair. Rabbi Shimon’s suggestion is to arrange a line of people, and have them hand the tefillin from one to another until they reach an enclosed place. Since each person is within four amot from the next one, no Biblical transgression takes place, and in consideration of the holiness of the tefillin, this arrangement would be permitted. Rabbi Shimon adds that the same rule would apply to someone who wants to bring his child into an enclosed place. He can arrange for a line of people to hand the child from one to another until it arrives at home.
The Gemara on our daf asks about the case of the child. What are the circumstances that would lead to such a situation? The explanation given is that the mother gave birth to this child outside and they want to bring the newborn baby home.
The Jerusalem Talmud understands that this case is when the baby is in danger and needs to be brought to the city because of its condition. Nevertheless, the sages preferred to suggest a method that would minimize hillul Shabbat – desecration of Shabbat – if at all possible. Our Gemara and its commentaries seem to approach the case differently. According to them, if there was a possible danger to the life of the baby, we would immediately instruct the parents to bring the child for treatment, even if it involved hillul Shabbat. The commentaries on our Gemara appear to understand the case to be one where it would be better or more convenient to have the baby in the city, but not that there is any danger at all had we left the baby with its mother where it was born.