Your battery's negative wire is connected to the ground wire... bad.
Look inside your control cavity and you will see that the jack has 3 prongs: the
ground (it actually connects to the shell of the jack and has a bumper/ring that touches the plug on its sleeve), the
right (-) (it is used for the right speaker on a stereo cable OR the battery's negative wire when you have a preamp), and the
left (+) (it is used for the left speaker on a stereo cable OR the input on most basses including passive/active since most basses are mono anyways).
Here is a stereo plug for your consideration:
Here is a mono plug compared to the stereo:
As you can see, there is no right (-) on the mono, just a ground sleeve. Therefore, when you plug it into your bass, it bridges the battery's negative wire to the ground and volia! a circut! So plugging in your bass turns the preamp on and unplugging it turns it off
Right now, your bass is either wired incorrectly (as in the battery's negative wire is connected to the ground) OR there is something causing a connection/short from the negative wire from the battery to the ground.
This connection could also be you leaving your bass plugged in since that turns your preamp on... doh! Lol
