Departures (Japanese: okuribito, Hepburn: Okuribito, "one who sends off") is a 2008 Japanese drama film directed by Yojiro Takita and starring Masahiro Motoki, Ryoko Hirosue, and Tsutomu Yamazaki. Loosely based on Coffinman, a memoir by Shinmon Aoki, the film follows a young man who returns to his hometown after a failed career as a cellist and stumbles across work as a nokanshi--a traditional Japanese ritual mortician. He is subjected to prejudice from those around him, including from his wife, because of strong social taboos against people who deal with death. Eventually he earns their respect and learns the importance of interpersonal connections through the beauty and dignity of his work.

Japanese funerals are highly ritualized affairs which are generally--though not always--conducted in accordance with Buddhist rites. In preparation for the funeral, the body is washed and the orifices are blocked with cotton or gauze. The encoffining ritual (called nokan), as depicted in Departures, is rarely performed, and even then only in rural areas. This ceremony is not standardized, but generally involves professional morticians (Na Guan Shi , nokanshi) ritually preparing the body, dressing the dead in white, and sometimes applying make-up. The body is then put on dry ice in a casket, along with personal possessions and items necessary for the trip to the afterlife.  Despite the importance of death rituals, in traditional Japanese culture the subject is considered unclean as everything related to death is thought to be a source of kegare (defilement). After coming into contact with the dead, individuals must cleanse themselves through purifying rituals. People who work closely with the dead, such as morticians, are thus considered unclean, and during the feudal era those whose work was related to death became burakumin (untouchables), forced to live in their own hamlets and discriminated against by wider society. Despite a cultural shift since the Meiji Restoration of 1868, the stigma of death still has considerable force within Japanese society, and discrimination against the untouchables has continued.  Until 1972, most deaths were dealt with by families, funeral homes, or nokanshi. As of 2014, about 80% of deaths occur in hospitals, and preparation of the bodies is frequently done by hospital staff; in such cases, the family often does not see the body until the funeral. A 1998 survey found that 29.5% of the Japanese population believed in an afterlife, and a further 40% wanted to believe; belief was highest among the young. Belief in the existence of a soul (54%) and a connection between the worlds of the living and the dead (64.9%) was likewise common.

Answer the following question by taking a quote from the article: what is the cultural background?
Japanese funerals are highly ritualized affairs which are generally--though not always--conducted in accordance with Buddhist rites.