Why do alkaline batteries seem to leak (corrode) more frequently when installed in a device?
Batteries installed in devices are almost certainly partially discharged. Nobody puts fresh batteries in a device and doesn't immediately use it, at least a little bit.

Any discharge at all produces hydrogen gas, which raises the internal pressure of the cell. This can only accelerate any leakage.