The man spit out the candy he’d been sucking.
If 吐く is to throw up, and if 出す is to remove or hand over, then if you throw up and hand that throw up over to someone via your throwing up, you are going to spit out at them, or to spew out, or something gross along those lines. Then again, this word can be used to be like "spit the info out already!" too, so it's not all spitting for reals.
The reading comes from 吐く and 出す.