Because they're guys. Making fun of each other is part of what guys do. It's probably got something to do with social dominance instincts: "If I can make my competitors for mates seem less attractive, it will make me seem more attractive by comparison, allowing me to get a more desirable mate."
Why legs specifically ... probably because the guy being made fun of has "funny-looking" legs and the guys who are doing the making fun feel particularly confident of their own legs. It could be ears, or hair, or teeth, or really anything; guys tend to go for the low-hanging fruit in these matters.
Guys may make fun of another guys legs because they are jealous.
Guys may make fun of other guy's legs because they are jealous.
A guy may make fun of another persons legs because they like them.
Guys make fun of other guys' legs for many reasons. They may find the legs ugly, too small, too large or are feeling insecure about themselves.
Maybe guys don't make fun of a guy's arms because there is nothing to make fun of.
Guys make fun of each other in a playful way. They just may be joking around with you, try asking them.
Guys may make fun of your legs, but not your arms because they are jealous of your legs.
If guys make fun of your good looking legs they are probably jealous that the girls like them.
If girls tell you that your legs are cute and guys make fun of them, the guys may be jealous of your cute legs.
may be you have thin legs
Because they think there is a reason and they are guys and they know it bothers you. If it didn't it would take the fun out of it for them. Be happy they couldn't find anything better or you would be in for even worse ribbing.
it good for both of you guys! just make sure you guys start licking each other out!