Although many Japanese will tell you they have no religion, when all is said and done Japan is a Buddhist country, and it's common for Buddhist rites to be observed when a beloved family member passes away. If you want to understand the Japanese concept of kata -- a word which can be translated as "mold" (to shape things with), "model" (as in the model number of a computer or other product), "type" (for classification, also being used for blood type), the customary postures taken in martial arts, or (in this case) "pre-defined customary form" in formal ceremonies -- there's no better example than funerals and other death-related customs. Buddhism in Japan is all about remembering your ancestors, principally your parents and grandparents, and there are many rituals to let your loved ones know they haven't been forgotten, which are comforting to both the living and the dead. One such custom is called Shijuku-nichi, or The 49th Day, when the family gathers 49 days after the death of a loved one to remember them. (49 is the factor of 7 and 7, considered the number of days required for a spirit to journey to the afterworld and back).
Death and funerals are very structured in Buddhist Japan.