Doesn't need to be.
A much simpler answer to that question would be, they found a way to replace the torpedoes.
Besides, obviously it is physically possible to do so: a torpedo is fired, you have to load a new one in its place. Logically, that MUST be the case. There are many examples where we in fact see this being done.
So what they must have meant is, if they run out, they assumed they wouldn't be able to find more. But obviously that was wrong, because they found more. Probably just traded with friendly aliens they met along the way. Honestly, it's not that much of a stretch.
Actually, when you come right down to it, they wouldn't have to trade for actual torpedoes - only the antimatter warheads used to arm them. A torpedo casing can be easily replicated. So all you'd need to trade for, is ENERGY. Once you have that, then you can power your replicators to make more torpedo casings, and also put the antimatter in them. Energy solves all resource issues.