When your derailleur goes into your spokes it may not only destroy your frame, but it may end up destroying your wheel, derailleur, and derailleur cable and housing. In really bad cases it will destroy your chain as well.
So why does it happen and what causes it? There are two possible reasons; improper adjustment or a bent frame (derailleur hanger).
If the limit screws were not set properly during assembly or someone has been fooling around with the hi or low adjustment screws, the derailleur is vulnerable to "over-shifting" or chain derailment, which can allow the derailleur cage to contact the rear wheel. If this happens when the wheel is in motion, the derailleur cage can get trapped between the spokes and cause irreparable damage. This type of occurrence would be considered improper assembly/adjustment and would not be covered by the limited warranty.
A second likely cause is a bent derailleur hanger. The derailleur hanger is the piece of the frame that the derailleur screws into. Sometimes the hanger is removable and replaceable, but not on all bicycles. When the derailleur hanger gets bent it misaligns the whole derailleur system. This is usually exhibited by sudden poor shifting behavior. In most cases the derailleur hanger and the derailleur will be bent towards the wheel.
The problem may not seem serious until you shift into your lowest gears with the rear derailleur. If the derailleur hanger is bent in, this shift will drive the lower pulley of the rear derailleur cage right into the spokes of the rear wheel. Hangers or frames can become bent if you crash or lay your bike down roughly on the drive side, or run over a foreign object (like a stick) that pushes the rear derailleur into the wheel.
If your hanger is bent, you will need to go to a shop to get it re-aligned or replaced. For bicycles that do not have a replaceable hanger, you may need to replace your entire frame or bicycle. Since a bent frame is usually the result of force caused by an impact, this would not be considered a manufacturing defect (a deficiency in materials or workmanship) so take care to inspect and perform schedule maintenance routinely.