Although hard drives are not completely sealed, they only have a couple of small holes which are rarely breached by fire. In most cases the external electronic parts (pcb) of the drive receive most of the damage, leaving the delicate discs and heads intact. The circuit boards are not well-protected as they are screwed to the outside of the drive.
Fire Damaged Hard Drive Problems
In a fire, the controller board electronics could be melted, either completely or partially. It would take a lot of heat to get through the solid metal drive case, but there is a risk that the heat could damage the magnetic coating of the discs. The discs are normally mirror-smooth but if they bubble or warp they will crash the heads. That would be an impossible recovery.
If the hard drive was powered-on during the fire, there could also be stuck mechanical parts internally. It would be a good idea to check the inside of the drive before applying any power.
If possible we would try to read any crucial code from the remains of the circuit board and then write that to a replacement part. If the board was too severely damaged we would need to attempt to rebuild a new board using similar drives as a reference. In many cases the information on the board is completely unique and often critical for access to the data; Without the original board contents, a recovery may be either impossible or very time consuming.
If we are able to get the electronics working again, we would need to check the internal parts of the disk and check for damage. If possible we would need to repair any damage. We have recovered data from drives that have been through house & office fires, and the fire rarely causes severe enough damage internally to prevent recovery. Fortunately the hard drive is usually buried inside a computer so gets some added protection from there, at the expense of the computer getting ruined.