To answer your question, they actually don't.
It's the nurses who would gently pat on the baby's buttock or back to let the baby cry. Now, you might wonder, why do they do so?
Actually, the act of crying indicates the capability of breathing on his/her own. Therefore, if the baby is crying, we could know that the baby is capable of breathing and is hence, ready to embrace the world!