Your lean angle is directly proportionate to your turn speed.
For example, if you take a turn at 15MPH, you only have to lean a certain amount, and you will not be dragging your knee. However, if you were to take the same turn at 90MPH, and try to use the same lean angle, you would highside, because of the centrifugal force exerted on the rider. Therefore, you have to lean the bike over to balance the lateral force on the tire, and the centrifugal force of the wheels.
Hanging off, is only a technique which accomplishes a few things.
One, by having a somewhat stabe platform on the surface,(the knee) it allows the rider to gauge his lean angle.
Two, it helps stabilize the rider by giving a small amount of support preventing him from making the lean angle too far down, thus losing the contact patch on the tire.
Three, it distributes more weight to the tires, by forcing pressure on the outside footpeg, forcing the tires to make better contact with the surface.
Four, since at high speeds, the gyroscope effect tries to pull the bike upright, leaning and hanging off applies more pressure to the top of the bike, holding it down, and preventing it from righting itself. (highsiding)
If you watch different riders on a track, you will notice that two riders can take a corner at the same speed, but at different lean angles. This is accomplished by the different ways the rider applies pressure to the rear tire. Example: If one rider has a lean angle of 55 degrees, and the other rider has a 50 degree lean angle, the rider with 50 degrees would need to apply a bit more weight to the rear tire to compensate for the lateral force on the tire.
Hope this helps somewhat.