Why is grounding yourself before working on any
computer-related task important?

Any time you touch an ESD sensitive component without properly grounding yourself, you run the risk of creating hardware problems where there were none before. From as little as making something sporadically malfunction without any rhyme or reason to it, all the way to completely "killing" a piece of hardware.

CPU's, motherboards, memory and PCI/PCI-e cards are the most vulnerable, but power supplies, optical drives, hard drives and anything else are still at risk. Grounding yourself is important to mitigate the risks outlined previously. It is also possible that if you send an electro static charge to a component in the computer while it is turned on, it could cause the power supply to short and in rare cases a fire could be created at the power supply or wall socket where the computer is plugged in.