There are several different types, but the most common ones emit smoke after a fairly loud (mostly harmless blast). They operate just like a grenade in that they are on a time delay. It sounds like he was playing around with it and triggered it accidentally.
Ive volunteered at a Goodwill and there was a bell (drive-over sensor) at mine you could ring when dropping large things off. Possible they had a bell (either pressure-engaged for cars driving by or an actual doorbell) and the employee came out to fetch and the detonation timer had been activated?