There are not many scientific studies regarding shaving legs and swimming performance but the claim "Shaving reduces drag and thus makes you faster" is supported by study of Sharp & Costill (1989) published in Medicine and Science in Sport and Exercise, however criticism of that study is small sample size, equating passive and active drag, etc..
A group of nine male collegiate swimmers were tested prior and after shaving down, with their performances compared a group of teammates who didn’t shave down. All the swimmers did a 400-yard breaststroke swim at 90% effort as well as a tethered effort.
The shaved group experienced a lower level of blood lactate, decreased VO2, and increased stroke length.
In a separate group of 9 swimmers who shaved versus 9 who didn’t, “velocity decay” was reduced in the shaved group when it came to doing a streamlined push-off as hard as they could.
The hairless swimmers went further, faster, showing that shaving down reduced active drag, “decreasing the physiological cost of swimming.”
Source
Other related studies regarding shaving and performance:
Sharp, Hackney, Cain and Ness (1988) did a two-day study of 6 swimmers. 4 x 200 descend each day with the swimmers shaved on the second day. Blood lactate levels went down by 28% at submaximal speed and 23% at maximal speed. The main criticisms involve the small sample size and the possible interference from back-back lactate sets.
Study that was more focused on researching the taper aspect of a swimmer’s meet preparation found that efficiency went up after the swimmers shaved down, with distance per stroke increasing by 5%.
Indiana University Counsilman Centre conducted a study aimed at exploring the physical effect of shaving on the perception of cutaneous sensation. Sensation perception was tested before and after shaving with and without wind blowing across the skin. Results showed that shaved skin required only 40% of the wind force for perception when compared to pre-shaved skin. In other words, shaved skin is far more sensitive. The effects of this were hypothesized to improve motor control and efficiency of movement in the water.
Many articles also suggest psychological boost of shaving their legs. 1, 2