It's not a problem to lose sleep over. It may even have been done purposely for some reason. Maybe the previous owner was in the habit of coasting down hill with the engine off, but wanted the brake light to work.
If you want to fix it, and your wiring is reasonably original, have a look in the headlight shell. There's a several strips of spade-type connectors. There's a bunch of connectors with red wires and a bunch with brown wires. There are also some other colours, but don't worry about them for the purposes of this exercise. The red wires are live from the batttery and the brown are switched via the ignition. Sounds as if your brake light wire is plugged into the mess of red wires rather than the brown. I thhink the brake light wire is brown, so if you can see a brown wire plugged into a red wire, that one might be the culprit.
If your bike wiring has been substantially modified, then the problem will still be of a similar nature to what I described above, but you're on your own when it comes to identifying the location of the interconnection and the wire colours.
Cheers,
Cam