Hanging off the bike allows you to reduce the amount of lean the bike needs to go round the corner. In normal conditions you are not pushing the bike to its maximum lean angle whether you are hanging off or not. This is why in wet weather you are better off moving a bit off the saddle so you don't have to lean the bike quite so much as you have less grip. Racers do it so they can get to the maximum lean angle for their bikes, but I would suggest its only a benefit for the track.