A lens's action depends on the refractive index of the lens material relative to the surrounding medium. In this case, the air bubble (refractive index ≈ 1.00) is surrounded by water (refractive index ≈ 1.33). Light rays passing from the denser medium (water) to the less dense medium (air) and then back to the denser medium will diverge. A shape that is convex when viewed from the outside but made of a less dense material inside a denser medium will cause light to diverge, similar to a concave lens in air.