A foetus does not breathe inside its mother's womb. The first cry after birth is the first attempt of the baby to breathe.
We breathe to take in oxygen. Oxygen is very much essential for the functioning of our body. The foetus receives oxygenated blood directly from the mother through the umbilical cord. (The umbilical cord connects the foetus with the placenta of the uterus of the mother). Hence, the necessity to breathe does not arise.
But, after birth, the umbilical cord is severed and the baby is forced to take in the atmospheric air for its survival. The lungs start functioning only after birth. The exchange of oxygen and carbon dioxide takes place in the alveoli of the lungs and the baby starts to breathe.
Courtesy : The Hindu