How do people think a bad brake line is going to make them hang? It would be the opposite, I wouldn't have brakes.
I have personally seen this, so it's not a "I heard this from someone" story.
If you have a deteriorating flexible ("rubber") brake hose this can happen. These flexible lines are multi layer, I'm not sure the exact construction, but there is an inner "rubber" liner the brake fluid flows through, a strengthening layer (a braided nylon or other material) and the outside "rubber" layer. What can happen is the inner "rubber" layer can crack, and when you press the brakes, the hydraulic pressure will push past the bad area, which can act like a flapper, and apply the brakes. When you take foot off the brake, the "returning pressure" from the wheels is fairly low. Now this flapper will fall "closed" across the hose like a valve and keeps enough hydraulic pressure at the wheel(s) to keep the brake applied.
I've also had a couple of friends replace "everything" chasing a hanging brake. Caliper, pads, rotor, master cylinder, shoes, drums, "master kit" inside the drums, wheel cylinders, and flushed the lines, with no effect. Asked if they replaced the flexible lines and they said no. Had them replace the lines, and all was well. We found the bad line by blowing through the lines. One way (from the master end, toward the wheel) it blew through fine. Switch directions, from the wheel toward the master, you couldn't blow through it, or it would only "leak" a very little amount of air.
Now a bad hard (steel) line, then yes, they normally blow, all the hydraulic fluid is pushed out, and then no brakes.