I was going to guess (surmise, postulate) that the caps were placed in jars to avoid them creating a spark on board a vessel which carried a large supply of black power and other high explosives.
But then they ran them with coal or oil fired boilers, so what real difference would that have made?
Good question though, Carl.