This, of course, is really not the case. Like most broad and gross characterizations in biology these rules are broken. There are what we call "warm-bodied" sharks and bony fish, such as the blue-fin tuna. They produce internal heat in a different way from birds and mammals but they are certainly not truly cold-blooded.
While researching warm-bodied fishes for a class I'm teaching I came upon a surprising natural history factoid: swordfish are warm-blooded...but only in their eyes. Unlike the "warm-bodied" sharks and fishes the swordfish heat production is much more like a mammal's. We have cell-parts called mitochondria (you may remember them as the "powerhouse" of the cell from high school biology) in higher density, especially in certain types of tissue. These mitochondria are responsible for metabolizing ("burning") food into energy on a cellular level. When these mitochondria metabolize food one of the byproducts is heat. So by having a high density of these cell parts you get more heat.
The muscle tissue responsible for moving the swordfish's eyes are also, like certain mammalian tissue, packed with mitochondria. These specialized muscles help to heat the animal's eyes and brain. Warmer eyes mean sharper vision, great for a large predatory animal, and a warmer brain means faster processing speed, which seems great for just about any organism.
It makes me wonder why mammals and birds evolved endothermy (a general term for any organism that produces heat from within its body regardless of how that heat is produced) but fishes which have been around a heck of a lot longer only a have a few representatives with this adaptation. Will there be more warm-blooded fish in another fifty million years?