This is one of the methods of assembling stone walls in Japanese castle construction, a technique where stones are precisely cut and combined. This method improves the stability and aesthetics of the entire stone wall and enhances the defensive function of the castle, as similarly shaped stones are stacked in close proximity, much like modern concrete blocks.
With almost no gaps, stone walls can be built taller than with other techniques due to their strength.