Hello snabilat,
I've been playing with PC HD's since 10MB sizes were top of the range. I've even manually (with a hex editor) formatted such HD's years ago to increase their capacity...
Modern HD problems come about by:
1. Mechanical abuse (knocks) causing heads to hit surface (damages head and surface)
2. Overheating causing mechanical stress and electronics damage
3. Poor/faulty electrical/mechanical construction
4. Poor disk surface coating (might flake off, made worse by overheating)
5. Mechanical wear due to normal use/life expectancy of coatings etc
Formatting, copying and deleting files, any ordinary use of a HD will not in itself cause bad sectors.
The more a HD is used, the more quickly it will just wear out (bearings go sloppy or sticky and out of tolerance etc). This includes repeatedly formatting, reading, writing etc.
Bad sectors are nearly always caused by mechanical shocks to the HD while it is in use. Sometimes by a poor coating on the platters or severe overheating. Not by normal use.
The only way using a HD normally could cause bad sectors is if changing the magnetism of the surface particles causes some form of wear - I have never heard of this and very much doubt it.
There are programs that claim to recover bad sectors and make them usable - they have never recovered a single sector for me!
I have seen occasions where a filing system (NTFS) has made such a corrupted mess of the HD that the drive is not recognizable to Windows, and won't even let the PC boot from it! A full wipe and format with a data recovery program fixes this - it's not a physical error - just a data one - but an error that probably puts a lot of HD's in the rubbish bin needlessly.
As to CD-ROM's, the only thing that may happen to the lens is dirt/age/heat may cause it to become a little opaque, especially if it is plastic. Careful cleaning (with a cotton bud and isopropanol, NOT an abrasive scrubbing CD!) helps here.
Dust gets sucked in through the front of a CD drawer, pulled by the PSU fan. This dust gets lodged all over the mechanics - a good, careful clean with IPA and compressed air often helps a struggling CD-ROM.
You may also hear about lasers getting weak. Maybe, but they have a feedback mechanism to control their power, so this is only a problem with *really* old units or ones with sub-standard lasers/faulty electronics. There is often a potentiometer to adjust laser drive, but increasing this is a last resort and will likely shorten the life of a unit - if it gives an otherwise dying unit a few more months though, why not?
The focus mechanism can also cause problems due to component aging and dirt. There is often a potentiometer to adjust focus/tracking.
Hope this helps.
FoxyRick.