The punishment for the events surrounding the sin of the meraglim/spies is
that B'nei Yisroel had to spend forty years in the desert, one year for
each day of the forty days that the spies spent on their tragic mission.
(14:34) In articulating this punishment the pasuk says that the punishment
will be on the basis of one day for each year ('yom lashana'). This seems
to be backwards. The pasuk should say that the punishment will be one year
for each day ('shana layom').
Rashi notes earlier (13:25) that HKB'H miraculously quickened the travel
time (or shortened the amount of distance to be covered) for the meraglim.
Had the journey taken the normal amount of time - meaning more days would
have been spent on the mission - then the punishment (if the meraglim
would chose to sin) which was destined to be on the basis of a year per
day would have been even longer. Through this intervention by HKB'H the
punishment was limited to forty years. [As to why forty is an appropriate
maximum number of years, the midrashim further explain that by limiting
the punishment to forty years HKB'H was ensuring that those who were
twenty at the time of the sin (i.e., just old enough to be punishable for
their actions) would live up to, but not beyond, the age of sixty. Sixty
is the appropriate age because they were being punished by 'kares'/cutting
off of years, meaning not living past sixty. Each person implicated died
at age sixty, so the youngest needed forty years to reach sixty.]
Because HKB'H predetermined the outer limit of how many years the
punishment would last, it is fitting that the pasuk describes the
punishment as being one day for each year, meaning that they spent one day
on their journey for each year of the predetermined maximum number of
years they would have to be punished if they sinned. See Rabbeynu Bachya.
[Isn't it interesting that we refer to the spies as 'meraglim' even though
the Torah does not use that term at all; the Torah always uses versions of
the verb 'lasur', but never 'leragel' for the activities of these spies.
Similarly, we refer to the splitting of the Red Sea as 'kriyas yam suf'
(literally, the tearing of the sea) as opposed to using the expression
used by the Torah, which is always a form of 'bekia'/splitting.]