Every dragon has a connection to some element of matter. They are like living conduits for it, and most can use it as a weapon. This is something else that I can't talk about without giving away too much of the books. The best I can do is say that at one time, there were dragons with multiple elemental types. Eventually, they evolved to only have one, but many carry a recessive trait for one or more other elements.
A hatchling will have the breath weapon of either the father or mother. In rare instances, it will have something that is an approximation of the two combined. In ever rarer cases, a recessive trait will emerge and the dragon will have the elemental connection of one of the parent's ancestors. It is impossible for a dragon to predict, and against their own laws to manipulate via sorcery or technology -- this constitutes damaging an unhatched egg, which is an unthinkable crime for dragons.