It is not just to keep a disease hypothetically on the new fish, from your current stock, but also to get the new stock used to the bacterial conditions it will experience in the intended new tank.
Your current fish may be immune to certain bacteria in your tank, but the new fish may not have immunity or tolerance for.
In my quarantine tanks I add water gradually from the tank they are going into, to allow a gradual transition to those conditions.
I quarantine for 2 months or longer, longer if the the new fish show any sign of listlessness, or sign they are not in perfect health, while adding a little water daily from the tank they are to go into, until the entire water of the Q tank is turned over..
Diseases like ick, can take up to a month or 2 to present. A new fish might have 2 ick protozoa hidden under its gill plate, such a tiny amount you may not notice until the ick population has become obvious. The time in the Q tank will allow you to treat it before it infects all your other fish.
Bacterial diseases are the same, the stress of the move could allow a non-infectious dose to become infectious, and in the Q tank allow an expensive antibiotic to used in either food, or water treatment in small doses before it enters the main tank and becomes really costly in dollars, or dead stock.
I do not add meds to the Q tank, unless I know what it is I am treating for.
A friend of mine who runs an exhibit at a public aquarium, quarantines all new fish for no less than 6 months.