Some parts of the body grow more than is necessary. When your a very tiny embryo your brain is too large to fit in your skull, so some cells must die so the skull can form around it. When your hands and feet form, you have webbing between your toes that must die so you can have individual fingers. The embryos of all vertibrates have tails, which of course must go if the embreyo is to become a human.
Any part of the developing baby that isn't going to be there after it's born must go. The cells must die through apoptosis.