What could have caused a rear derailleur to end up in the back wheel suddenly?
Every time I've seen a correctly adjusted rear derailleur go into the spokes while riding it was because something made the chain jam in the rear derailleur and the force of pedaling tore it off and put it into the spokes.

a few possibilities:


broken chain - if the chain breaks in such a way that it won't go through the pulley cage.
Foreign object in the chain - something gets caught in the chain in such a way that it won't go through the pulley cage.
Incorrect chain installation. If a chain was installed such that the pin wasn't seated correctly the chain can pull apart under stress and get stuck in the pulley cage.
On an abused chain (not like your well oiled chain) links can get tight or rusty and fail to make the sharp bends between the pulleys and get stuck.


Do a careful inspection of your chain when putting your bike back together.