And the ability to breath fire would also be a huge advantage, but evolution does not seek advantages, it merely keeps mutations that happen to be beneficial. No one has been born with a mutation that has allowed them to breath fire (or if they were they obviously didn't have much reproductive success) and thus we are still unable to breath fire. No one who has been born with a mutation that prevents the development of ear muscles has had especially great reproductive success either.
Well no, being able to breath fire is probably evolutionarily stupid. There is no reason to think it would be helpful, it'd presumably involve animals building up a highly flammable concoction inside their bodies and occasionally exploding. For no gain, since they could do what everyone else does and gather combustible material and set it alight. And flamethrowers just aren't very effective weapons on average since they'd tend to burn an animal's home down or be very energetically demanding for no upside vs something like a good pair of jaws or claws.
If evolution can figure out photosynthesis it can figure out flammability. Flammability is actually pretty easy. Even monkeys can manage it. There probably have been animals that breath fire and it just didn't catch on because it is wholly impractical.