it should all just boil down to a code of 1s and 0s. So I am curious how the 1s and 0s can sometimes, in some situations, get flipped, or somehow f***ed up.
More than being lost during compression, Compression algorithms used to store data on an HD never lose any data.
Losing data due to the compression can be observed only when trying to compress more than once in formats like 'jpg' of 'mpeg'.
1s and 0s are rarely translated sharply as 1 or 0 on the physical support but more like '1 is 0.6 to 1.3' and '0 is -0.3 to 0.4' whatever is the support, or, better to figure '1' is over 50% of 'something is written' and '0' is under 50% of 'something is written'...
Figure on an old punch card with Holes and 'not Holes', a little dust in a hole should not transform it into 'not an hole'. The same acceptance is used on magnetic supports (Hard drive) and the 1 & 0 are 'more or less magnetized or not'. Even translated into an electrical signal, while computing in a PC, the electrical levels are never sharply ie 3v for a 1 and sharply 0v for a 0 (or the contrary).
So there are a lot of chances to lose a few of '1s' or '0s' on any support and during the whole writing or reading process, but there are also a lot of ways to ensure that the information will be correct at the end, using maths (statistics, multi-writing, control sums and so on) to control all these little errors and let passing only a few errors, but you'll always have errors.
On a laser disk, you have also the same effect as on these old punch cards, holes are micro-holes engraved with a laser and when getting old, the whole surface tends to get transparent and transform into a big hole engraved by the sun rays (kind of, holes are actually more mirrors...)
When getting old 1s tend to get old too, resembling more and more to 0s (or the contrary), information disappears slowly with age. In the old times, we used to refresh magnetic supports by reading the files and writing them again on the same support (floppy disks, magnetics bands... xD) or on brand new supports. We could make them survive 5 to 10 times more than their time to live.
This said, on an Hard Drive, you have the magnetic support but also the mechanics and electronics embedded to read the data from the support. The time to live of the magnetic part increased hugely on modern support, and 'refreshing data' is no more so necessary... because mechanic would die first, or in many cases at the same time, when the reading head lands on the surface of the disc '(
If the reading head has lightly moved (misaligned head), it doesn't face sharply the physical point where should be written the '1' and would read ie 50% which is not a 1 and not a 0... and this on most of bits, the whole content becomes very difficult to decide using stats. This is the main issue on an HD, making files hard to retrieve.
Fixing electronics can be done like described but this can work in rare cases only. If you can read part of data and lose most of them, it's surely not an electronic issue. imo, on an electronic issue, you'll have nothing at all. Most of HD errors come from mechanics failures: you can hear 'tac-tac-tac' when trying to read some files or you'll get only bad files.
Mechanic parts are very sharp and sensitive and the less little choc can fuck it out. The disc itself (magnetic part, with the mechanical reading head) is enclosed in a 'box' that never should be opened in ambient air to avoid any dust. A speck of dust has a huge size compared with the distance between the disc and the head and can destroy it.
When your data is precious, the best way is to make it retrieved by some specialized service who works in white rooms, these data retrieving companies mentioned upper. Service is generally expensive though, but they try all to retrieve data, when it is possible, even by dismantling entirely the disc in their lab in white room (an expensive room with no dust at all inside) and send you a brand new healthy disc.