Because Dabi told him to, because he wanted to know which one they still had in their possession.
Besides, you act like if they'd have left him like that, he'd have just been trapped in the ball forever. I'm betting it wears off after awhile or if the Magician gets too far. So it didn't really matter if he let him out or not once they lost control of the ball.