Well only in case of breastfeeding (though, how would everybody know if they have hep b?) but it won't help against getting it from saliva, transmitted from one child to another, if one child happens to have hep b.
Some viruses are easily transmittable and can cause long term damage to small children. It's a serious threat, which can ruin lives of far too many children.
Pregnant women are tested for hep b so it is known if the mother has it. New borns don't play together to infect each other. Again, the baby of a mother with hep b can be vaccinated, no need for the broad brush.
Ah, of course there are differences between countries, as procedures are different. My original comment wasn't about vaccinating newborns, mostly about transmission of the hep b virus.