CDex can extract the data directly from an Audio CD, which is generally called an Audio CD Ripper or a CDDA utility. Of course you can do that also by recording through your sound-card.
However, recording by sampling the signal with your sound card implies that the signal is first has to be converted to an analog signal by the CD-ROM, which is fed into the sound-card and digitized by the sound-card.
In practically all situation the quality of the recording will be deteriorated (unless you have a CD-ROM that has a digital output of course). CDex on the other hand, is reading the digital audio data directly from the disc, which can be stored in either a WAV file or a MPEG (MP2 or MP3) sound file.