The Ewoks have a bad rap. It's not entirely undeserved; they're cuddly teddy bears just begging for kid-friendly merchandise and spinoffs, and neither attempt to cash in on them feels like it really belongs in the Star Wars universe.
But fans should not be tempted to dismiss the Ewoks -- that's exactly the mistake the Empire made. From a certain point of view, the Ewoks are the true heroes of the Rebellion. Without them, the Rebels would have been severely weakened at the Battle of Endor, perhaps even destroyed, and might not have been able to defeat the Empire.
Ignoring the Ewoks
Why, when they had built a shield generator on an already populated planet, would the Empire then ignore that local population? They aren't unaware of the Ewoks; they had some contact with them while building their base, and even captured a few Ewoks as slaves. But there was no Imperial effort to control or enslave all of the Ewoks on the Forest Moon of Endor.
Perhaps this dismissal of the Ewoks as a legitimate threat stemmed from the Empire's racist attitudes and policies. Of course creatures that looked like harmless teddy bears wouldn't be worth anyone's time. And they have a primitive culture and can't speak Basic, so they couldn't possibly be intelligent!
Our heroes can hardly claim moral superiority on these points; they also dismiss the Ewoks' significance and intelligence because of the cultural and linguistic barriers between them. The Return of the Jedi novelization is superior to the film when it comes to the Ewoks because it portrays the Rebels' encounters with more nuance and less condescension. In the film, convincing the Ewoks to fight for the Rebellion is as simple as pretending C-3PO is a god and impressing them with battle sound effects. In the novelization, on the other hand, Princess Leia convinces the Ewoks to ally with the Rebellion because of how the Empire will affect their home and their tribe. Instead of focusing on how awesome the Rebels are, she recognizes and respects the Ewoks' culture and the situation they're in.
Victory over a Superior Force
The Ewoks are obviously not a match for the Imperial forces, militarily or technologically. But the Empire was foolish to ignore the Ewoks' home field advantage. The Ewoks knew the lay of the land, how to navigate the forests without being seen. They knew of the nearly-unguarded back entrance to the Imperial shield generator, even though they were not actively fighting the Empire. The Empire, on the other hand, fought with a relatively small force of soldiers and some AT-STs, transports that were ill-equipped to handle the uneven terrain.
The Ewoks, like the Rebels, also knew how to improvise and gain every advantage they could when fighting a superior force. Their first action in the battle is to distract the guards by stealing a bike, leaving only one guard to fight. They didn't have heavy guns to blow up the AT-STs, so they used logs and rocks to trip and smash the unstable walkers.
The Ewoks used their primitive weapons as their livelihood, to protect and hunt for their tribe; they did not discount their effectiveness. It was the Empire's error to believe that slings and spears, no matter how much less impressive they looked than blasters, were not still genuine, deadly weapons.
Overconfidence is Your Weakness
In dismissing the Ewoks as a threat, Emperor Palpatine made the same error he made when pitting Luke Skywalker against Darth Vader: underestimating his enemy. This fatal flaw of Palpatine's was ultimately the Empire's downfall.
The aid of the Ewoks in defeating the Empire makes the Rebel victory even more significant. For one, the Empire's defeat at the hands of primitive aliens is a great symbol for the alien races the Empire hated and enslaved, and a key sign that the Empire's fixation on the grand scale -- symbolized by their concentration on the Death Stars -- was a flawed approach to controlling a galaxy full of individual societies. But it is also a lesson for the Rebellion. They could not have accomplished such a victory on their own; they, too, must have learned not to underestimate help from unlikely sources.