The medium inside of a waveguide is occupied by gas. It could be vacuum, probably even with less loss. However, what should not be in there is water. It is nearly impossible to prevent water in the miles and 10's of thousands of joints necessary for waveguides.
Optical waveguides, i.e. fiber, are solid, and therefore prevent the intrusion of water instantaneously, and somewhat on long term basis as well. Granted, glass fiber and its jacket WILL absorb 'microscopic' amounts of water, causing high loss. But it takes awhile and is easy to prevent with a very tiny amount of material on each joint. It's also highly effective sealing.
Undersea fiber optic links are amazing. Every so often a fiber optic amplifier, made of fiber, is insterted in series. The energy for the fiber optic laser is ANOTHER laser shooting all the way to the other continent. Using splitters and combiners, a small amount of the LOWER frequency (longer wavelength) power laser is sent through a specially doped piece of fiber, keeping the dopant atoms in an excited state. As the pulsed signal laser combines in the laser amplifier fiber, it triggers additional laster power from the exicted atoms in the amplifier and well, amplification happens :-)
Another part of the puzzle is called time dispersion. Not all photons take the exact same path in the fiber. Some hug and bounce off the walls, some go down the center. So not all arrive at the same time, since having traveled microscopically different path lengths. This cause the amplitude of the energy delivered by the photons to be spread out, the wave form does NOT instantaneously jump to full amplitude. This limits the bandwidth the longer the fiber.
The ingenious physicists and optical engineers figured out if the made fiber where the lightspeed is slower in the center to than at the outer wall in a glass fiber, that the photons could all be realigned in time as exit this 'correction fiber'. Since they made the change in speed significant, it only takes a small amount of fiber every kilometer or so to make the correction.
NOW, all of this is built into a cable assembly, sealed, and dropped into the ocean. The asembly is done on a ship at sea as they drop it, or in a truck on the side of the trench on land. I've watched some of it being done on land. Amazing. The most amazing part is, there is no electricity or electronics in the entire cable for THOUSANDS OF MILES. All of the reamplification and waveform reshaping happends optically as described above. I forgot to mention that since the power laser is lower wavelength and continuous wave, it has a very low loss in the fiber, and can go to at least the halfway point. They could then inject power laser from the OTHER continent to the midway point to amplify the signals the rest of the way to the target continent.
NONE OF THIS is possible in the RF domain. And as others said, the bandwith is insane. Nowadays, they can add channels via: wavlength discrimination, polarisation discrimination, optical rotation along the center axis, and spirally injected light in aa spiraled do-nut shape down the fiber. Quite a few others are being attempted. So fiber bandwidth will continue to climb for a while, using fibers already installed!