At the beginning of 'Endgame', the borg had exceptionally little interest in the federation/humans:
The borg actually didn't bother assimilating a starfleet ship full of humans! An easy target, too - a single ship, surrounded by dozens of borg cubes.
By the end of 'Endgame' - we have 'Destiny'.
Janeway's actions caused this massive shift in the borg's pririties.
Irresponsibly, she poked a sleeping giant in the eye. And what came out of that pandora's box?
60+ BILLION dead - federation citizens, but not only.
BTW, it's a deux ex machina that all those other powers are not extremely pissed off that they paid in blood for the federation's foolishness; they were consistently depicted as reacting violently at FAR smaller offennces.
Was the borg destroying countless civilizations? Yes.
But, if you're as pathetically weak as the federation proved to be in 'Destiny', you don't have what it takes to play on their level; your moralising speeches are empty rhetoric and your tactical half measures earn you extinction.
You may not like what happens, but, frankly, you have no choice in the matter; it's like an amazonian primitive tribe attacking nazi Germany, alone, during WW2 - and expecting NOT to be exterminated with barely an effort on Germany's part.
Janeway - much like the rest of the federation (on other occasions) - displayed the sin of hubris, recklessly gambled with the lives of BILLIONS and lost. Luck never lasts forever - and the federation's luck ran out.