As for why your system freezes I don't know. That could be related to any number of things. The reason the CD plays on is because most CDroms have an analog sound output that connects to a small cable that carries the sound to a connector on the sound card. When playing an audio CD in this manner the CD is doing all the work and is not dependant upon the system. It's reading the digital data from the disk and converting it to analog sound all inside itself. It has its own DAC to perform the digital to analog conversion. When the sound gets to the soundcard it's already analog audio and just goes through the mixer and out to the speakers.
There are some programs that play audio from a CD using digital extraction. That is they read the data from the disk just like reading a data CD through the disk controller the Cdrom is connected to. Then they play this digital data through the soundcards in the same way you would play a wav file or any other digitized sound. Many people prefer to use these type of programs because since the sound data comes from the Cdrom as digital data instead of analog it results in better quality provide of course you have a good quality sound card that has a better DAC than the CDrom drive. If you had been playing a CD using a program that works in this manner the sound would have probably hung up when the system did.