I guess hard drives would be dead because of enormous acceleration on launch day.
I don't know that that is the primary reason HDD's have been avoided. But any moving part is another source of failure so my guess is the HDD's life is not as long.
As far as I'm aware I don't know of any spacecraft that has flown a HDD (but there certainly could be). However, some early spacecraft did use tape drives. Hubble originally used tape drives and was replaced with solid state memory during one of the servicing missions.