Could also be that the tube was pinched somehow and that the friction of riding caused it to expand a bit (leading to its explosion after your ride). This seems somewhat less likely (explosions like that tend to happen when you're putting air in). That's always a fun one though.
When you replace the tube, check to be sure it's squarely within the tire. It may be that the tube didn't blow the tire off the rim, but rather, that the tire was never over the rim correctly, and that the tube was between the tire and the rim, and consequently blew.