A proper studio compressor will give the user control over all possible parameters: threshold, attack, release, ratio, knee, makeup gain, at a minimum. Most compressor pedals dispense with most of these options. Add to that the fact that a wideband compressor is always a bit of a compromise, particularly so on highly dynamic bass instruments.
This is one reason why multiband compressors were invented, so that we can compress certain frequency bands more than others.
Although compressors only compress, the way in which these parameters are set can actually cause a compressor to increase dynamic range, rather than decrease it. This is done by using a relatively long attack time that allows the signal amplitude peak through before compressing the signal, resulting in an apparently greater difference between peak and sustained volume. So, rather than "squashing" your sound, a compressor can actually make your tone more aggressive and brilliant.
There are so many ways to use compression, but I think many people's impressions of compression have been negatively affected by compressor effects pedals that really don't offer a wide variety of options to the player, usually wideband analogue units with design roots in the 1970s that were really intended for guitar use, rather than bass.
A modern multiband digital compressor can be a revelation for many people, provided they learn how to program one. Unfortunately, learning to program a compressor well is not as simple a task as using other types of effects, because what a compressor does is the least easy part of sound to grasp: near-instantaneous but subtle changes in volume within an individual note. A common problem is people not being able to tell if a compressor is doing anything, at all, and so they crank the knobs until they hear the compressor obviously functioning, at which point they often conclude they don't like what compressors do.