The saying in Japan is that you are born Shinto, married Christian, and die Buddhist.
I am not a historian, but here is my understanding of the current "history" of Japan. Shinto had an artificial resurgence during the meiji restoration as money was pumped into it. Shinto was seen as a way to push society back toward an emperor-centric governance model. Shinto at the time was closely aligned with the powers that believed propping up the emperor was important.
If you travel around Japan you'll see many jinja (shinto shrine). Within a few minutes walk from my house there are three large shrines and maybe six small shrines. Most of these were built during and immediately after the meiji restoration.
The modern view of the 'history of Japan' was actually heavily influenced and curated by the powers that shaped Japan in the second half of the 19th century. Many things that people believe are part of 'ancient Japan' are mostly handpicked tools used by the political elites of the time.