I'd like to preface my answer by saying that I think the OP has asked an interesting theoretical question that deserves a theoretical/hypothetical discussion. In no way should the following be taken as an indication that removing/installing batteries carries low risk of explosion. Take precautions when working around vehicle batteries.
The risk of hydrogen gas explosion during battery removal/installation can be similar to the risk during jump starting, though as a thought experiment (read 'i have no proof'), I believe there are some important differences: the potential for/severity of arcing, and the presence/concentration of hydrogen gas.
Regarding the arc: when removing/installing a battery, presumably the vehicle has most electric systems switched off, so there is very little current draw on the battery, and thus lower potential for arcing (it's nearly an open circuit, which of course would not arc). Compare this with jump-starting. You have one vehicle with a good battery at 12-14V, and another vehicle with a discharged battery (maybe < 11V) that is prepared to suck up a whole bunch of current while trying to recharge itself. I would think this creates a higher potential for arcing.
Regarding the hydrogen gas: this stuff is lighter than air. It would tend to dissipate. when installing a new battery, you're making the connection in an airspace that should be largely free of hydrogen--When you removed the old battery, you removed the only source of hydrogen, and the new battery was just recently introduced to the space, and so would not tend to have had a chance to emit much hydrogen in the area.
That said, be careful whenever working around batteries. One source says 2300 people a year in the US are injured by lead-acid batteries, many of these are acid burns to the face. Ouch.