Japan had many customs that kept structure in their society; they had religion, the samurai and religion.
The first custom is the samurai. The samurai was a warrior class in medieval Japan that worked under the daimyo and shogun. They had a samurai code, bushido, that expected samurai to be loyal and honorable to lords. The samurai helped the social structure of japan because they protected people like peasants from attacks. This is important because the peasants are the ones making their food so samurai know that they have to be protected.
The second custom is religion. Japan had two types of buddhism, amida and zen. Amida buddhidm believed that anyone could reach paradise, but zen believed that it took hours of meditation to become enlightened. Buddhism was used to calm the minds of peasants and help overcome the fear of death. This is important because if the samurai wasn't calm, then they would be scared of death and battle, and it taught people discipline.
and The third custom is the feudal system. The feudal system had ranks like the shogun, daimyo, samurai, and peasants. The feudal system was based on a fair exchange between the classes, such as the peasants giving food and samurai giving protection. This is important because it gave the top classes have power over the lower classes. This helped Japan because without having control and trades, the lower class would revolt against upper classes.