Ancestor worship is based on the belief that the dead punished those who did not follow the rules that they had followed when they they were in the flesh.  Ancestor worshipers view the failure to have sons as the supreme calamity for all time and eternity.  The great strength in a veneration of ancestry is the value that such an attitude places upon the family.  Later this ritual developed into a pseudo seance at which ghosts were reputed to have appeared.  During a certain period, solar veneration became a species of ancestor worship. 
Ancestor worship onetime constituted a decided advance in religious evolution, but it is both amazing and regrettable that this primitive concept persists in China, Japan, and India amidst so much that is relatively more advanced, such as Buddhism and Hinduism.