Catastrophic failure My rear wheel suddenly became loose in traffic today. It is completely off axis. The axle looks fine from the outside. I remember being told something about loose cones. 

Should I bother to repair this beater bike or should I invest in a road bike? This is a department store mountain bike. 

And yes I took apart the rear brake because I thought that was the source of the problem ... (I.e that's not something that broke) ... Risky I know ... But I had kool stop salmons on the front so I thought that would provide sufficient stopping power. Nonetheless the wheel kept grinding against the frame as you can see in the picture so I stopped again and realized the wheel was completely off center.
Most likely the source of the wheel going loose was loose nut. Department store bikes are not likely to have quick release which is safer because it does not become loose with time.

Put the wheel back and screw it on tightly. Don't forget to check the front wheel too, because if that goes loose the consequences will be very unfortunate.
The wheel on the picture looks off centre which is likely because it is not properly in.

The question is whether you need need to invest into more serious bike. If cycling is interesting to you, the answer is definitely yes. Just don't buy those bicycle-like objects in department stores anymore.