Keep in mind that not all sailplanes are designed for extremely light weight. Decreasing the weight also decreases the minimum sink rate, but doesn't help the still-air glide ratio, and actually hurts the glide ratio against a headwind.
Even in sailplanes that are designed for very light weight, designers have sometimes thought it worthwhile to employ a rather large vertical fin. A good example of this is the Carbon Dragon.
The basic purpose of a vertical fin is to prevent the aircraft from flying sideways through the air, especially when the pilot makes an aileron input, which tends to create adverse yaw. Adverse yaw tends to be most pronounced in long-spanned, slow-flying aircraft.
Flying sideways is never efficient.
However, not all sailplane designers have always followed this philosophy. The Scheibe Bergfalke is an example of a glider with a rather small vertical fin. (Look closely at photos of this glider and you'll see that more than 75% of what appears to be the "tail" is actually the rudder, not a fixed vertical fin.) When flown with the pilot's feet off the rudder pedals, it tends to be rather uncooperative in response to aileron inputs, being quite happy to fly sideways through the air rather than actually turning.
Keep in mind also that a given desired "tail volume"-- the product of tail area times moment-arm-- can be achieved with less drag with smaller tail on a long slender boom (rear fuselage), than with a larger tail on a shorter fuselage. You've really asked two separate questions here-- "Why is the tail boom so long?", and "Why is the vertical fin so large?". The first question is easier to answer than the second-- the tail boom itself creates relatively little drag, due to its slender cross-section and resulting low "wetted area". The tail boom is long so that the fin and horizontal tail don't need to be larger, to create the desired tail volume. Though in truth, when we dive into the details of spiral stability theory, we find that extending the tail boom while keeping the "tail volume" the same actually does produce very significant changes in the aircraft's flight characteristics, due to that fact that the airflow and "relative wind" are actually curved whenever the flight path is curved. This also means that for a given "tail volume", the drag reduction resulting from extending the tail boom and decreasing the tail area will be less in turning flight than in linear flight.
Certainly the purpose of the long tail boom and large vertical fin is not to "balance" the weight of the cockpit. Rather, the cockpit is placed in the optimum position to balance everything else.