We have Q to thank for the Federation's first contact with the Borg. This would be the contact that would ultimately precipitate their time travel into the past and eventually send a message with the location of Earth. When Q sends the Enterprise to meet the Borg, the Borg were already on their way to Earth. Q considered himself helping the Federation by revealing the new threat.
This might appear as a paradox except the events occur with the 24th century Enterprise D meeting the Borg, engaging in combat, losing, meeting the Borg again at Wolf 359. Eventually traveling back in time, leaving two Borg behind, who later in the 22nd century send a message which is delayed likely due to a reduced quality subspace signal or even worse, a signal sent at the speed of light... which eventually reaching the Borg. The Borg begin a trip to the Alpha Quadrant which Q interrupts by sending the Enterprise to meet them in the 24th century; temporal loop closed or bootstrap paradox created.
Wikipedia entry on the supposed first contact with the Borg:
The Borg first appear in the Star Trek: The Next Generation episode "Q Who?", when the omnipotent life-form Q transports the Enterprise-D across the galaxy to challenge Jean-Luc Picard's assertion that his crew is ready to face the unexplored galaxy's unknown dangers and mysteries. The Enterprise crew is quickly overwhelmed by the relentless Borg, and Picard eventually asks for and receives Q's help in returning the ship to its previous coordinates in the Alpha Quadrant. At the episode's conclusion, Picard suggests to Guinan that Q did "the right thing for the wrong reason" (a T. S. Eliot quotation) by showing the dangers they will eventually face. It is suggested that the Borg may have been responsible for the destruction of Federation and Romulan colonies in the final episode of season one, "The Neutral Zone".
I am certain the Federation's temporal dynamics agency is certainly displeased with how this event took place, but since it was precipitated by Q, it isn't as if they could punish him, and as terrible as the events at Wolf 359 were, the entire Federation might have been assimilated by a single Borg cube without the experiences of the Enterprise crew at their first contact with the Borg.