The ancestors understood according to Shinto belief when ancestors pass they are believed to become kami. These kami live close by to check on their family. These keep a connection between family both living and dead.
Shinto is also called as kami-no-michi is the ethnic religion of Japan that refers to ritual practices to have a connection between the present and the ancient past of the Japan.