OK the ending is a bit weird, just as was said before. But you must have found out that, in the Star Wars Universe the poorly armed sneaky guys always win. Just remember Yavin, Naboo in TPM, Geonosis in AOTC (They were completely outnumbered even with the clone army) and so on So in that way the ending of ROTJ was realistic