While the other answer is basically correct, it really doesn't tell you why it does this.
These two things are related because of the differential. The differential is made to allow either side to spin at different rates. There are three connections to the differential in a rear wheel drive vehicle: drive shaft (from transmission); left axle shaft; right axle shaft. If any one of these is not connected, this allows either of the other two to spin freely. Since one axle shaft is gone on your vehicle, this allows the power to go out through it the brokens side of the differential without moving the vehicle. Conversely, since this axle shaft isn't there, it allows the other tire to spin freely when the car is in park. It would work the same way if one tire was on a sheet of ice or was up in the air. There is an escape route for the power, or in your case, this allows the other tire to spin.