Fetal hearts use glucose as their primary metabolic substrate. Adult hearts use free fatty acids, which are less efficient (require more $O_2$ to synthesize the same amount of ATP); however, during cardiac failure, the heart can switch to glucose utilization. Why doesn't it just use glucose all the time?
Lipids require more oxygen to burn, but also they are cheaper to store (since they have great calorific power than carbohydrates and they're hydrophobic, thus not requiring water for their storage). The body can store so much lipids that it becomes an almost everlasting energy source (A normal adult have enough energy stored as fat to allow basal metabolism for weeks to months), which cannot apply to glucose. If fat is not present, glucose would have vanished from the body long time ago. Glucose levels must be maintained at a certain level, because it's the main energy source for the brain (which cannot use lipids).
For all the previous reasons, the heart (and many other organs, like the liver) uses fat while possible. If possible just means when not starving to death and with sufficient oxygen supply. This second condition doesn't apply to heart failure. In this case, oxygen supply fails and the tissue switch to glucose just because they can use it without oxygen (glycolysis and lactic fermentation).