You can make lenses that are designed for a glass air interface too. Most famous of these is probably that of the Nikonos:
Many Nikonos lenses, the "UW" series, were specifically designed for underwater photography only. It is said that, even to this day, no underwater lens matches the Nikonos "UW" lenses for sharpness and color saturation underwater. A brief explanation from Nikon about the difference between underwater-only lens and standard/"amphibious" lens can be found at Nikon official site, under the section "2. Rendition characteristics and lens performance".
More on this lens system also at photo.net.
Note that there are two schools when it comes to focusing Nikonos because it wasn't an AF body at first, and it didn't have TTL viewing. The first is the macro 'here is the bracket':
You focus at a specific distance, put the bracket there, and those things are in focus. The other is the wide shot (note the longest lens for underwater with the system is 35mm) and trust the hyper focal distance for the lens (which is designed for it).
From the photo.net article on focus for wide angle:
I often pre-set the focus at about 1.5 feet, and only move it for extremely close shots. On the 15mm and 28mm lenses, there are calipers in the focus area that show the depth-of-field for whatever aperture you have set.
The technical bits that underwater lenses do is they often put another 'lens' element in the lens, or in the case of additional hard cases, a specific piece of glass or optical plastic for the lens to account for the water interface. From the Thousand and one nights Nikkor site:
It is noted in every introductory book on underwater photography that the subject looks 1.33 times larger under water than in air caused by the refractive index of water (1.33), picture angle gets narrower, and the focusing should be made by the distance estimated under water with the eye, but in addition, the change of aberration cannot be neglected.
In case that the water-tight window is made of a parallel plane glass just as this lens, it is known that the spherical aberration and astigmatism don't change but chromatic aberration and pincushion distortion are generated in the periphery of the picture frame. This distortion is generated by the front parallel glass in principle and the degree becomes larger in proportion to the picture angle of the lens. As the situation can be checked when you look into a water tank, please try it if you have a chance to go to an aquarium. If you observe the inside scene of the water tank of which window is made of parallel plane glass, you will find that the inside scene is distorted and colored at the far side of the tank.
Because of that reason, regarding the lens wider than 35 mm for "NIKONOS", separate lenses were prepared for use on land and underwater respectively such as "UW NIKKOR 28 mm f/3.5 (exclusively for underwater)" and "LW NIKKOR 28 mm f/2.8 (exclusively for on-land use)" (1983), for instance.
The design for the optics of an UW lens looks like:
And you can clearly see the parallel glass plate.
The other challenge (at least for lenses that have a manual focus options - autofocus only can use all internal bits) is the mechanisms to keep the water out of the lens, and handle the increased pressure of water rather than air. The Nikonos lenses do this with screws:
More modern lenses can use internal focusing to make the barrel fixed and not have issues with water proofing. Modern underwater zoom lenses have an O-ring system. For example, the Nikkor AW 10mm f/2.8 for the Nikon 1 system (yes, I know I'm mentioning Nikon products - its the ones I'm familiar with):
Looking at the lens construction for this lens, you can again see the parallel glass plate for the air-water interface: