The physics of braking in a corner are pretty interesting. If you brake gently, or roll off the throttle, the bike tends to drop deeper into the corner (lean more). If you brake aggressively then inertia will tend to stand the bike up, making you run wide. Remember; you're slowing down at the road's surface, due to friction, but the top of the bike wants to keep going in the same direction, at the original speed. That direction is straight ahead, rather than around the corner.
Then you get into the physics of braking, itself. When you're straight up and down, travelling in a straight line, the force of friction is applied in the same plane as your movement (ignore the front tire as a rotational point for this; stoppies need not apply). As you approach the traction limit your tire can rotate, in order to maintain as much traction as possible while braking. A tire that's skidding doesn't have the maximum friction between itself and the road surface. Even if it does "break loose" you're going in a straight line, so there's not much bad to happen.
Now consider a bike in a turn. It has two things working against it. First, as you lean the bike over the contact patch between the tire and the road is reduced. Less surface area in contact means less frictional force, which in turn means less force to break that contact (cause a skid). The force is also at an angle to your direction of travel, so the tire cannot use rotation to deal with the force of braking. At least not as efficiently, since the force is not in the same plane. That makes it even easier to overwhelm the contact patch's friction. Under braking there's also weight transfer to the front wheel/contact patch, so there's more force present that could overwhelm that frictional force.
Leaning off maximizes the contact patch by allowing the bike to be more upright. That means more friction and less chance of overwhelming that frictional force while braking. It also means that if the road surface changes, due to something like spilled diesel, you might well have enough friction to ride through without crashing.
And yes, hanging off means less distance to fall if you lowside. That's why you try not to break in a corner, if you find that you're going too fast for it, but instead lean more and hope to ride it out. Worst case you lowside, which is generally a lot better than riding straight off or highsiding.