Here's why:
* Johnny was controlling and manipulative: Johnny, despite being a young boy, was incredibly cunning and had a strong personality. He was constantly tormenting Sam and Bill, driving them to exhaustion and near madness.
* They couldn't escape him: They tried to leave him at the railroad tracks, but he followed them back, laughing and taunting them. They tried to leave him at a deserted house, but he came back and scared them.
* He was the only one who could get them out of their predicament: They were trapped in their own scheme. They couldn't get rid of Johnny, and they couldn't get a ransom because he was making their lives miserable.
In essence, they were hostages in their own kidnapping. The only way to escape Johnny's torment and the ridiculous situation they were in was to return him to his father.