You must understand that evolution is not a contious thought process it runs more by chance than anything else. For an animal to develope lungs which are very comlex things, there needs to be a process of random genetic mutations. If an animal does not undergo the aproriate mutations and have them supported by natural selection it cannot evolve lungs. A fish cannot simply go "I'd really like a set of lungs" and then presto get a set!
This kind of argument fits the evolution model very well so is more of an "evolution is right" statement than enything else!
One (or more) group of aquatic animals did develope lungs, and here we are thanks to some lucky genetics!
Bald ape