The question is: why doesn't the federation use time travel in order to erase the borg from existence by preventing their emergence?
Because time travel is a tricky thing and can sometimes be dangerous. It should never be used as an option unless all other weapons and options have been exhausted first. Even so, you might intend on changing one thing, but wind up changing countless other related things. Eliminating the Borg could remove them as a threat, but introduce an even worse
adversary to the Federation that the Borg had originally eliminated (and as bad as the Borg are, they did wake the Federation up from a period of complacency that might have left them in a worse condition to face the Dominion, IMO).