This reveals the problem to be poor gameplay design, rather than a pathing problem. If the best tactic to counter a rush is to build supply depots or other buildings as a wall, then we need actual WALLS. Defenses should be able to stop these attacks at the gate. A single protoss warrior between two pylons should not be your rush-defense strategy, its absurd.
That's kind of what I was trying to say.
It's absurd to think that a marine (or protoss, or whatever) is going to act as some kind of immovable wall. You
should be able to push past individual troops. It makes sense. Yes, I understand the
cop with a riot shield analogy above... But you know what? If you had a half-dozen zerglings trying to get through that narrow gap, they'd simply trample him. He shouldn't be an immovable object.
A wall wouldn't lower your unit capacity when destroyed and would be tougher.
Cool. I'd still rather use supply depots/pylons, because they're actually useful. Walls are only useful for about the first 10 minutes anyways. After that you might as well put your supply depots on perma-lower and send your 2 guard zealots off to die scouting, because the enemy's gonna just fly in anyways. Walls would be permanent, block your ground units, and be completely useless outside of the rush time. Seriously, there is no need for 'dedicated' wall units with no benefits except +100 hp.
Ultimately it comes down to gameplay mechanics. Due to the way the game is built, rushes happen. An early swarm of quick, cheap units can completely ruin your day. So there needs to be a defense. And, due to the way the game is built, that defense takes the form of half-assed walls to keep those rushes from doing too much damage.
The game could very easily have been made differently - either to eliminate the threat of rushes, or to provide a better defense.
Look at the old C&C games - you could build walls and gates. The gates automatically lowered to let friendlies through. They were crazy cheap, built very fast, went a long way towards mitigating the threat of a rush, and didn't hamper your own troops. Sure, they were useless against flying units... But they did their job and didn't hamper you, so it wasn't a bad thing to build them initially.
Blizzard could have added some kind of defensive walls to the game and made it work. To suggest that is impossible is just silly.
Decisions were made along the way that resulted in the current design. The design where you wind up using a couple individual units to form a wall.
In the context of the game - that works. The mechanics work. It is effective.
But it doesn't make sense. Logically, a couple marines should not have the same effect as a cement wall.