There are different types of muscles, people training for stamina and not for short extreme physical activity build lean muscles. Also their legs have to carry less weight.
Ballerinas stay thin, because they watch their diet and are very active. Bulky thighs are more genetic, then due to certain activities. Many people who go into ballet are naturally long and lean.
Muslce size and gain is controlled by diet as well as exercise. Even if you lift heavy weights, you won't gain much muscle size if you don't eat a lot. Ballerinas tend to restrict their diets to avoid gaining muscle or "bulking."