One can use the analogy of someone who steals fails to repay the theft. He is told that as long as he does not commit any further crimes, he will not have to pay. If he does commit another crime, he will have to pay both what is owed for the future crime but also for the original debt. This is not that a person is being punished for what his ancestor did, but he is being punished for what he did as well as the debt that was already owed.
Note that when we say that a person is not punished for what his father did, that only means that he does not continue to sin.
Furthermore, this is something that applies to the entire nation, such as the meraglim or the destruction of the temple. It does not necessarily mean the sin of an individual.
The Bnai Yisrael caused themselves to be lowered in the level of spirituality by sinning with the aigel hazahav. They were not punished fully as they would have deserved. Thus, every sin (as a people) that is done, includes the results of that sin as well. For example Mikraos Gedolos Ki Sisa 32:34 cites Rav Yosef Bechor Shor
וביום פקדי ופקדתי עליהם חטאתם – כלומר: אני מוחל להם עתה, שלא יזוקו בדבר זה, כל זמן שלא יוסיפו לחטא. אבל אם יוסיפו לחטא, כשאפקד עליהם החטא
שיעשו, אפקוד גם זה עמו. כאדם שאומר לחבירו: אני מוחל לך כל זמן שלא תוסף
לעשות, אבל אם תוסף, לא דיי שלא אמחול, אלא שאפקוד עליך גם מה שעשית עתה.
That is to say that I will forgive them now, so that they will not be
harmed by this matter, as long as they do not continue to sin. But if
they continue to sin , when I judge them for the sin that they do, I
will also judge this also with it. Like a person whio says to his
friend: I forgive you as long as you do not continue to do [this], but
if you continue, it is not enough that I will not forgive you, but I
will judge what you did now.
This is like someone who receives a suspended sentence and is released on parole. If he commits another crime, his parole is revoked and he must serve the original sentence as well as whatever punishment is due to the next crime.
Rav Hirsch points out that this is a matter of the entire people having to raise themselves back to the level they had been at during matan Torah. As a result, every sin that occurs as a people needs to take into account the level that the people are at, and what has caused them to be reduced to that level.
You have to enter a future on the basis of the sin not being atoned
for - a future which has to raise the people to a higher standard by
passing the most testing experiences of trying events, and so attain
atonement. A complete forgiveness, a lifting off of the sin, making it
as if it had not occurred (נשא) would imply that the people were
already back to the stage of moral elevation at which they were when
they were when they received the Torah ...
Rabbi Dessler in Michtav Me'Eliyahu can explain this using the Nekudas Habechira (point of free will)
He states that a man has one point in
his service to G-d where he has to fight his evil inclination, while
at other points there will be no struggle, for the levels below this
have already been conquered, and he will easily win those battles of
will; whereas levels higher are not yet within his grasp. (For
example, someone who adheres to Orthodox Judaism will have no problem
keeping kosher, but may sometimes be tempted to rely on unreliable
kosher supervision, while somebody farther away from religious
practice will have to struggle with whether to eat a ham sandwich
(which is non-kosher regardless of supervision).) Each time one
defeats the evil inclination by choosing to do good over evil, his
Nekudas Habechira is raised a bit higher, and that choice will be
easier for him to make in the future. Consequently, Man's task in life
is to consistently raise his Nekudas Habechira, thus growing ever
greater in his service of God.
The chet ha'aigel lowered the nekudas habechira to such an extent that all of Bnai Yisrael was reduced to a level so that any future sin became possible only as a result of what they did. As an example, had they not allowed the chait ha'aigel to occur, they would not have panicked and sinned when the meraglim brought the bad report of the land. Indeed, it is quite possible that the meraglim themselves would not have rationalized themselves into bringing that report in the first place. Had they not sinned, they might have been able to avoid the destruction of the mishkan at Shiloh or of the temple.