Brannon Braga wrote them in and hoped no one would ask questions.
There was alot in Voyager that we didn't see. Alot of downtime. Alot of the ship. We saw the crew routinely traded for supplies. It seems pretty obvious that they used the industrial capacity within the ship, and materials gained via off-screen trade, to build more. Hell, the built the Delta Flyer from scratch in a few days. Voyager obviously had at least one industrial replicator.