Just guessing, but a battery inside a computer/phone, even if turned off is probably still powering at the very least a few wires. Even if they don't go anywhere (i.e. they are not connected anywhere else) they probably are slowly eating away the battery. On the other hand, I don't know how modern computers/phones turn off, but I doubt they involve a full circuit cut (i.e. there is no big red button making a click sound and closing all wires coming out of the battery)