Teddy bears?  You mean the brutal cannibalistic ambush experts who (implicitly/offscreen) cooked and ate their defeated Imperial adversaries (and were prepared to do the same to the "heroes" of the story until they mistook a droid as their Lord and Savior)?

Ewoks are fucking hardcore, and are a force with which to be reckoned.  Combine that with the following:

* There were *way* more than 30 of them; the Imperial forces were woefully outnumbered

* The Ewoks caught the Imperial forces by complete surprise

* The Ewoks had managed to completely surround the Imperial ground troops before the battle even started (plus the previously-captured rebels shooting from within the Imperial unit)

* The Ewoks had (albeit marginal) air superiority (and even if the Imperial forces fielded some TIEs, they would be less effective as CAS than the Ewok's gliders due to the dense forest cover)

* The Ewoks had far better familiarity with the battlefield than the Imperial troops

* The Ewoks were actually camouflaged (at least somewhat, "somewhat" being far better than the Imperial strategy of "let's stick with all-white armor that can't even survive some rocks dropped on it")

It's a miracle the Imperial troops survived as long as they did.