Babies receive the hepatitis B vaccine at birth primarily to prevent them from getting infected with the hepatitis B virus during birth, especially from their mothers if the mother is infected. The vaccine acts as a critical safety net against perinatal transmission of the virus, which can occur as the baby passes through the birth canal. Infection at birth is very risky because about 90% of newborns infected at this time develop chronic hepatitis B, which can lead to serious lifelong liver diseases including cirrhosis and liver cancer. Early vaccination drastically reduces this risk and has been a cornerstone in preventing hepatitis B infection in infants since the recommendation became universal in 1991. The vaccine is given within 24 hours of birth because while pregnant women are usually tested for hepatitis B, some infections may be missed or the mother may contract hepatitis B late in pregnancy. Additionally, the birth dose protects against the possibility that others in the household or caregivers who might unknowingly carry the virus could transmit it to the infant. This early vaccination strategy has led to a significant decline in hepatitis B infections in children and helps protect infants throughout childhood and later life.