They are also among the most difficult to answer. Your observation that the administration of steroids to mothers in pre-term labor tends to speed fetal lung maturity is also correct. This transition is an important part of birth.
Mechanical forces squeeze the fluid from the lungs.
Steroid hormones secreted by the mother during labor also help ready the baby for the transitions of the first day of life. These hormones affect every cell of the body, preparing them to meet the stressful situation. A child who is born before the normal gestational age has not yet finished in-utero development. If the delivery is abrupt, a partially developed baby is born. The mechanism for this is the release of stress hormones.