What I'm thinking is that Heart Containers are artifacts of power. For one thing, Heart Pieces, which form Heart Containers, are usually found outside of enemies or bosses. This relation implies that it's not an organic essence of a creature. Rather, a Heart Container is likely a power source for bosses. It's likely no coincidence that they come out of giant, magical creatures, and that they emerge from the representation of the villain's control over the beast. Heart containers are probably used by the villains to imbue their servants with greater power, and when Link slays such a beast, he takes said power. Heart containers also likely explain why Link doesn't take injury from attacks, but that's another topic.