I think they can breath in the water too (sick fish sometimes "pant"). But their main source is from the air, and they can't last off oxygen in the water too long.
Yea, they can breathe with their gills as well, I think they just prefer to breathe atmospheric air. My guess is that the labyrinth developed through natural selection and the gills just haven't faded (for lack of a better word) away.