These T-shaped doorways have stumped scholars, we are not sure of their use.  I personally think they are narrow at the bottom to stabilize the ladder folks ascend to enter; it prevents shifting from side to side.  The top is wider giving the doorway its classic T-shape so the residents can enter carrying a fully loaded pack.  The vigas or beams protruding from the wall once supported an upper floor or roof.