Linux uses PulseAudio, which has a poor default configuration, resulting in bad sound.
With some tinkering with the PulseAudio file, reading a lot of websites about the settings, I was able to get PulseAudio to have sound that’s subjectively as good as BSD, Mac, etc. By default, PulseAudio uses a resampler called “speex-float-1” which is horrendous. The reason this is chosen is to maintain compatibility on very small and bad sound cards. This shall be reconfigured to either “speex-float-10” or “soxr-vhq” for best quality. Some other changes also improve the sound.
Make the Sound Good (Reddit | r/linuxmint)
Also see: PulseAudio (Linux Reviews)