Many chemicals both in the detergents and possibly in water can cause damages to the machine. There are some other problems like hosepipes or other fittings getting loosened in the course of time. Improper electrical connections can also cause damages to the machine. No one can predict the problems that may occur due to moisture, heat, chemicals and electricity. Overloading of clothes also can cause damage to the machine.
The above list is not exhaustive, but it's a great starting point. Washing machine repair is by no means a simple task, but it becomes a lot more manageable for the average homeowner when you're at least somewhat familiar with the parts that you're looking at. Take a minute to look over the owner's manual that you received when you purchased your current unit; there should be a complete diagram with all of the parts labeled. If you misplaced the manual or can't locate a helpful diagram, there are countless online resources that can help you with your DIY repair by allowing you to look up your exact model specifications and helping you identify exactly which parts may be at the root of your washer's malfunction.