In most of India, there is a tradition of keeping the new mother and newborn baby in confinement during the initial few days. The duration of this confinement varies from 21 days to 40 days.
The basis of this tradition is to allow mother and baby to recuperate from the ordeal of labour and delivery. They are usually kept in a room with no outsiders allowed. This is also done to ensure baby does not catch any infection from people from outside.
These days, people do not follow this tradition completely and it has been modified to suit current times.