This has happened many times to me so Im not sure its intended or not. This is just an example, it doesn't always happen like this, but this is when I am truly frustrated by them-- My gunners will be shooting at something outside the walls, destroy it, then walk back 4 walls to the breach, go inside the base to get something that was just out reach, destroy that, then walk back out of to base go slightly past the four walls they were originally shooting from to destroy another defense, that as the crow flies is technically closer to something on the inside of the base, but the walk from the inside to the outside is a much further walk. Then they will go back inside the base after they destroy whatever was on the outside and I'm lucky if they aren't killed by defenses. It seems very ineficiant, like they are yo-yoing. Its like they do not take the wall travel time into their pathing equation. A short version is--- outside- long walk around to inside- long walk back outside- long walk back inside. Next time it happens I'll post some pictures to help clarify.
Here is a picture of it happening- Even though it looks like there is 1 gunner (above the fast forward button), it's actually a group of gunners that are just about to destroy the outhouse and they succeed. Now they have 2 options, go for the bunker on the same side of the base, or go back 3 walls to the 4th where the destroyed wall is, go through it and take out the Stonemason. While the Stonemason is 1 square closer, heading back through the walls and getting to it is clearly farther. This is where they end up.
I should also add that I am strictly going for gold and had the gunners gone for the bunker, I would have easily gotten to both of those storages.
Thought I would add to this with some pictures. Hopefully not too many. In one attack I noticed two really poor decisions from the gunners. There are three gunners attacking the PH with nothing behind them. After the PH is destroyed, two of the gunners walk back towards the water. Wide view to show nothing around the gunners and they are shooting from the west half of the destroyed building. After the PH is destroyed, two of the three turn and march toward the water. Notice the gunner smack in the top middle outskirts that looks like he just destroyed a building. Now he's within range but not attacking anything. Now he's in the opening in the wall, still hasn't attacked anything. Now he's next to the distillery and mine, still doesn't attack anything and just dies.
Wow, that's... weird. I've seen them walk in and out of town repeatedly to go after buildings, but never anything that messed up. Great job getting all the screenshots.
The gunners walked to the water then turned around and walked toward the base. No need to do more screenshots, but I've now seen the gunners do all sorts of glitchy things. Very unpredictable. Mostly they don't attack what's in their range and walk to their death trying to attack something else. Or I drop 20 gunners holding my finger down and then a witch doctor. 19 gunners go one way, 1 gunner and the witch doctor go in the opposite direction.