It is important to distinguish between a real hermaphrodite and a monoecious hermaphrodite.
A real hermaphrodite will have both an X and a Y chromosome. Real hermaphrodites are uncommon, especially from good seed banks.
Monoecious hermaphrodites are much more common.
Monoecious hermaphrodites are often the result of poor environment as opposed to genetics.
Many growers over feed which is for some varieties enough to make a female plant produce male flowers.
Heat is also a very common cause of stress. This is how the "feminized seeds make hermies" myth began.
The resulting seeds from a monoecious hermaphrodite are certainly not useless. They are feminized seeds that are as likely to become monoecious hermaphrodites in the same conditions the parents did.
When a female plant (XX) produces male flowers, it is a normal and natural survival mechanism. The pollen only has X chromosomes, so it can not produce male plants.
Properly made feminized seeds make 99.999999999% female plants. That, along with the latest findings on cannabis sex determination, lead me to believe that a plant's sex is determined in the seed