To understand ancestor worship you have to start from animism, which is its direct cause and its necessary background.
There are different opinions on what exactly animism is, but the way I understand more than a religion it is a way of seeing the world.
Animism consists in believing that you can understand the world through introspection rather than observation. To find solutions, you therefore look inside and not outside. This may sound like a form of mysticism, but it’s the opposite. The simplest way to interpret the world is intuition, and that is what animism uses.
To an animist human beings are the center of the universe. Everything is concrete and belongs to this world, even what you cannot see. In other words, the spiritual world - including the soul - is concrete and is basically the same in nature and the material world. A soul gets hungry, needs to sleep, walks and gets tired after walking, and so forth.
The spiritual world is a facet of the material world. There is no other world. Many people think of animism as primitive. The Chinese, the Japanese, the Koreans, and most of the Far East is animistic. I will let you decide if these peoples can be defined primitive or not.
Animists therefore believe like us there is a part of the human experience that is invisible. Like us, they believe it cannot be experienced directly. Unlike us, they believe it's basically the same in nature as the concrete world.
This way you thinking has astonishing consequences. In Japan, for example, among them is the Imperial house, which is not at all what you think but something so unlike anything you know that I cannot tell you exactly what it is right now. I have to explain a number of things first. The most important one is the causal relationship between animism and ancestor worship.
What happens when somebody dies? The Christian believes that the soul goes to paradise, becomes a pure spirit and never comes back. It no longer needs or desires anything of the world we know.
To an animist, all death is is the loss of a body. We are all know how the human mind rebels at the idea of death. To animists, death does not exist because they trust this innate feeling. They believe that a dead person remains where the body died. It retains its character, habits, tastes, weaknesses and strengths. It needs shelter, food, rest and companionship like before. It doesn't have the means to take care of itself, though, because without the body it cannot work. At the same time, having entered the realm of spirits, it now has the powers that pertain to spirits.
It follows that the dead have both reasons - discomfort and envy among them - and means to hurt the living. The Chinese and the Koreans solve the problem by keeping the dead at bay and devising ways to keep them out of the house.
The door of the traditional Chinese house was sometimes protected by a spirit screen (see photo, courtesy of Wikipedia Commons).
The Koreans bury the dead up on a mountain, where the soul can see the landscape and stay away.
The Japanese, as usual, do the opposite and bring the dead right inside the house, something the Chinese find horrific. The Japanese feed them every morning, talk to them, they consider them an active part of the family.
The next time we'll see the astonishing consequences for society as a whole of ancestor worship, an institution that leaves its mark on everything it touches.