I've always wondered, why the heck is the castle gate OPENED? It's kinda like saying "come on in to our lovely castle, oh dear besiegers".

Not sure about the Japanese art of castle warfare, but in Europe, most of the efforts were spent in breaking through the gates/ scaling the wall, correct? Once you get through, the castle is pretty much done.