The Memory Alpha page on the 'Year of Hell' timelines explains this as a result of the temporal core suffering damage thereby causing a temporal incursion:
The impact, and the resultant destabilization of the temporal core,
caused a temporal incursion within the weapon ship, erasing all of its
previous changes. As a result, Voyager was warned away from Krenim
space on Day 1 by the same ship they originally encountered (with much
less belligerency), and were able to plot a course around the Imperium
This is also supported by the description of events described in the specific wiki page for that episode.
Now, what is a temporal incursion I hear you ask? Well, Memory Alpha explains it as basically being an act designed to alter a timeline. The basic answer to your question is then that by destroying the temporal core, it didn't just have an effect immediately, but had an effect throughout time. Therefore, it basically wiped its own existence from the timeline, meaning none of the changes from the Krenim ship occurred, restoring the timeline to what it was originally. The timeline, from the viewer's perspective, was restored to Day 1 of the year of hell, but really it just was the corrected timeline prior to the Krenim ship's activities. That is, the timeline was reverted back to before the Krenim temporal core was created, not to day 1 of the 'year of hell'; we just saw the timeline from that point on and proceeded as though the Krenim ship hadn't made any changes.