Voyager was taken into the Delta Quadrant by an entity that was looking for something.
What was it that it was seeking?
The "Caretaker" was looking for beings capable of maintaining the array that was caring for the Ocampa.
The Caretaker reveals that he was part of an alien race whose technology had long ago accidentally caused the rainfall cycle on the Ocampa planet to become disrupted and leaving it arid, due to the destruction of that particular M-class planet's atmospheric nucleogenics. To make up for the error, he and another of his race stayed behind to care for the Ocampa. His companion having long moved on, the Caretaker has used the Array to seek species from distant galactic sectors with the potential to help him reproduce and maintain the array; the strange disease that Kim and Torres had was a result of that test.
The Caretaker was bringing people to the Ocampa planet in the hope that they would replace him in his role as caretaker of the Ocampa.
Gorchestopher H's answer is correct, but since Wikipedia isn't the most reliable source in the world, here's the relevant quote from the transcript of the show itself:
JANEWAY: Why were you bringing ships here, infecting people with a fatal illness?
CARETAKER: Oh, they didn't die of an illness. They died because they were incompatible.
CARETAKER: I've been searching the galaxy for a compatible biomolecular pattern. Now, in some individuals I found cellular structures that were similar, but I ... JANEWAY: You've been trying to procreate?
CARETAKER: I needed someone to replace me. Someone who'd understand the enormous responsibility of caring for the Ocampa. Only my offspring could do that.
ST:Voyager, Episode 1: Caretaker (emphasis mine)