The dying Caretaker was insistent that the Array not fall into the hands of the Kazon, because then they would have used it to destroy the Ocampa, whom he was trying to protect. Janeway's sense of Starfleet morals wouldn't allow it either, so she destroys the Array at the expense of a way home. The Maquis thought she was crazy, and some of the Starfleet crew questioned it too.
The real problem with the story was suggesting that the Array could send them back in the first place, but then Janeway wouldn't have had to make a moral decision.
If the Caretaker had destroyed the Array himself with a countdown device, it would have removed the opportunity of returning home without Janeway being responsible for it.