A compressor pedal can be used for bass to help balance out the levels of a bass signal. It can reduce the dynamic range of a bass guitar, making the quiet parts louder and the louder parts quieter. This can be beneficial in a live setting where the volume has to be consistent to avoid overpowering or being overpowered by other instruments. It can also help to improve sustain and tone consistency.
Moreover, a compressor pedal can add clarity to the bass tone by controlling the gain, minimizing the low-end thump and adding a bit of ‘bite’ to the high-end, making the bass fit better in the mix. It’s a tool for sculpting your sound and should be used to taste.