They do pay for it and it is expensive, but apparently it made a large reduction in child poverty, so that's a win.
From my understanding, it also reduced women in the workforce and reduced investment in childcare infrastructure since more mothers were then taking care of children at home.
So this is possible, it just depends on what you want to incentivize.