Because the federation changes over time, there are good times and bad. One of the core values in many Star Trek stories is redemption through change, it's the central idea of this one.
Also because the federation is an allegory for whatever real world good guy alliance you believe in and fascist elements coming and going from the federation are a commentary on the real world.
It would be even better if in addition the borg only offered assimilation to individuals by choice, defending their right to join with overwhelming force and leaving everyone else alone. There would be a whole moral to-do about prisoners choosing the collective and the borg showing up to get them and then the Starfleet people who are lonely decide to go and then someone thinks they need to save one of those people so they go in with a plan to destroy the collective from within but realize that everyone is there by choice and they have the option to leave but don't.