The main cost to a company of doing this is that it may incur some higher costs and it may lose some predictability. For example, a firm that is trying to do this might try to provide day care to help its employees have a place for their children to go before and after school. This, of course, costs money. A firm might also try to provide more flexible scheduling opportunities. This makes it harder to predict when people will be available for work and it makes things like meetings harder to coordinate.
It is also possible that such programs will lead to tensions. Employees without children might resent the resources and effort being used on their colleagues while they get no such benefits. This could be a cost in terms of reduced morale.
However, you must keep in mind that there are several benefits as well. Firms with such programs may find it easier to recruit good prospects who have families. This sort of advantage might well make up for the added costs.