The AT-AT is blaster-proof, friend. What is more, it appears to be heavy laser-proof, too. It can't just be ripped apart by a three metre tall creature.
And the legs aren't more vulnerable than the rest of the thing. I don't see your reasoning for why it should be, at least, seeing they hold the thing up and thus need to be pretty strong, as they're what the enemy will target.
Awesome points! Also dont forget were talkin' 'bout futuristic metals and stuff. Plus the larger animals are, the more I find that their strength-size ratio goes down (ants can lift up to 50 times their weight, lemurs are pretty strong, I can lift twice my body weigth without breaking a sweat, I doubt elephants can lift their body weigth and I know for a fact that whales cannot lift theirs). so I doubt a rancor can destroy something made a s dense as metals, particularly ones stronger than steel. Although I must say, rancors are taller than 3 metres tall; although, they still shouldn't be able to kill a walker.