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.
Chat with our AI personalities
Why don't you ask the guys that are making fun of your legs, what the problem is. You shouldn't be so obsessed with your legs and what other people think.
Guys may make fun of other guy's chicken legs because they are not muscular and are not perceived as manly.