Oxygenated blood returning from the lungs (into the left atrium) and deoxygenated blood returning from the body (into the right atrium) get mixed in the single ventricle, the ventricle then pumps part of this blood to the lungs and part to the rest of the body. This has the effect that the body will not get blood satured with oxygen but it is good enough even if it is less efficient than a four-chambered heart.
The fact that these are cold-blooded animals and are not expending a lot of energy in heat production probably factors into this. Thus, reptiles* and amphibians can survive with a less efficient cardiac design. They are also able to shut off pulmonary artery flow to divert blood to the skin for cutaneous respiration during diving which may also compensate for a less efficient heart.
*The crocodilians are the exception to this design in the cold-blooded realm and have a four-chambered heart. However they are also capable of shunting pulmonary blood flow while diving. This anatomical setup is believed to be the most complex cardiac design in any vertebrate.