Unless we’re talking about high end analog compressors (think 1000 or more euro), software is perfectly fine. Many would say even the high end stuff isn’t really any better sounding than the best plugins.
Of course, there might be other reasons to use hardware, such as playing live and having an unreliable computer and/or soundcard. Or maybe just liking to tweak physical, dedicated knobs.