Who keeps the children

A man and his young wife were in divorce court, but the custody of their children posed a problem. 

The mother gets up and says to the judge that since she brought the children into this world, she should retain custody of them. 

The man also wanted custody of his children, so the judge asked for his justification. 

After a long silence, the man slowly rose from his chair and replied, "Your Honor, when I put a dollar in a vending machine and a soda comes out, who does the soda belong to… me or the machine?"