Somewhat of an urban legend ;-}
First, Apple does not have an sensors in any of their current or older products so if you had opened the case to install RAM or remove your systems HD if your system had gone bad it would not wipe out your systems HD.
With that said I could see someone adding a sensor but it would still need some logic to be useful and I don't know of any built-in logic by Apple in their systems to leverage such a sensor. IBM & Dell both have some logic in some of their desktop systems to reset the system password but it still does not wipe the systems HD.
What you maybe eluding to is 3rd party software that prevents someone from accessing your data if you have had your system stolen. We call this a time-bomb program so if you fail to access the system with the correct password the drive is locked out or wiped. There is also a different 3rd party product that phones home when connected to the internet that can be programed to wipe its' self by you.
You could also have an encrypted drive so it can't be removed from the system as the systems ID is tied to the HD so it can't be swapped or the data accessed if the HD is thrown away.
In most cases when a HD is swapped out and does not appear to be working in the new system the systems BIOS settings are not correctly set. With serial ATA (SATA) drives this is no longer an issue. The last thing is the age of the system (or BIOS) that can't handle the newer very large drives. So if you have a newer systems HD it may not play in the older system. All that maybe needed is upgrading the BIOS.
Lastly, a loose or damaged data or power cable can make a HD appear as being wiped.