There is actually very little lithium in a Li-ion battery, typically only about 1% by weight (source). What makes Li-ion battery fires hard to put out are the other materials such as the plastic separator, organic chemicals, carbon anode coating and aluminium plates. Lipo cells are particularly nasty because they are contained in a soft polymer pouch which ruptures and allows bits of flaming battery to 'explode' all over the surrounding area.
Throwing a burning li-ion battery in water does two things: firstly it cools the battery down which reduces the formation of combustible gasses and removes heat which prevents them from burning. Secondly it deprives the fire of oxygen which most gasses need to burn (though not Lithium).
If the battery has not yet 'exploded' then the Lithium is contained in the cells where water can't easily get to it, so the explosion which occurs when exposed Lithium metal is thrown into water is unlikely to occur. If the battery has already exploded then the small amount of Lithium in it has probably already burned, and the water is just putting out whatever is left.
I have decommissioned a lot of damaged Lipo batteries. I do this by first discharging each cell with a resistor until the open-circuit voltage is less than 1V. Then I hammer a nail through the battery to short out all the plates. Sometime the battery gets a little warm and may even emit a bit of smoke, so I keep a bucket of water nearby. One time I put a nail through a large fully charged battery that I had forgotten to discharge. Flames shot out of it and a huge amount of smoke quickly developed, but the fire went out and smoke subsided as soon as I threw it into the water.