I'm not sure what you're saying here...do you agree, disagree, or what?
I'm not saying it was a doctrinal flaw of the Empire, but tactically at least it's hard NOT to call Endor a massive bungle. But as I wrote, hardly the worst ever, since pretty much all armies had those. It's just embarassing because it was such an important engagement - and also, tactically speaking, not something terribly innovative on the Rebel part.
You argued that they lost sight of their objectives,"defend the bunker". I'm asking how do you figure that.
The Stormtroopers were assigned to outer security, patrolling the forest and etc. The naval troopers were the ones assigned to directly defend the bunker itself. Nobody lost track of anything, much. The stormtroopers job was to serve as the reaction force and they did it by chasing the ewoks into the forest, presumably with the commandoes. Han hijacked their comns and asked the internal security force to open up the bunker and give them more reinforcements to pursue the enemy. That opened up the perimeter for the Rebels to attack.
None of this is..... you know, contary to standard doctrine. To defend an airbase, the security forces are now deployed into one that's assigned to patrol and the other that's limit access.(Perimeter defence vs..... something control...... I was nodding off during the lecture:D). To complete the pursuit mission, the stormtrooper asked for reinforcement. All of this is... logical. The lieutant wasn't to know that it was the Rebel team in disguise, and the opening of the bunker opened up the perimeter so that the commandoes fought their way in.
The REAL issue is the paucity of troops........ something I think Battle of Endor explained with the backdoor bit.... That's the inexplicable bit. My personal retcon is that the majority of the stormtroopers were out in the forest where Luke Skywalker was picked up, we know from that report to Vader that they sent more patrols in the region.