When SoX is asked to record at any sampling rate (-r switch), it warns it "can't set sample rate" to that rate and that it's using 48000 Hz instead. This happens on two different PCs (both running Debian) using three different sound devices.
ffmpeg and arecord both record at specified rate without any trouble, so it seems like it's a SoX bug.
Please find debug log attached.
Most modern sound devices support only multiples of 44100 and 48000 Hz. Some (cheap) sound cards even support only 48 kHz. Depending on the system configuration, ALSA may automatically resample to the reqested rate. Sox disables this feature, which probably explains the difference in behaviour you're seeing.