Companies do have a Responsibility yes and that is for several reasons
Sometimes it is the requirement by the Law to do so for example Maternity Leave (SA & Zim Labor Law) to allow the mother to give birth and nurse the child. Family responsibility leave (SA Labor law) for when a child is not feeling well.
Gender Mainstreaming - by allowing a woman to go on Maternity leave whilst still receiving her full or part thereof of her benefits and financial rewards is simply a matter of realizing the role of women in society and the changes that have brought us this far. It is only fair. In SA still a man can also take Paternity leave as well to allow the father to see his newly born baby as alluded to in Basic Conditions of employment. (Gender Balancing)
Social Responsibility Reasons - we are all human and we all have a duty to society or to say the least to the societies we operate within to make sure that all employees are well taken care of. In this particular instance, the company can choose to have a nursery at the workplace that takes care of kids while the mom is being productive. It is a huge stress relief to have a company do that for its employees.