Sounds like a short between the brake light wiring and the side light wiring. This is most likely cause by rubbing causing the wires to become exposed.
Does this only happen this way or does turning on the headlights cause the brake light(s) to come on?
Does this only happen this way or does turning on the headlights cause the brake light(s) to come on?