E.G: Thyme has well known antimicrobial properties and thymol is (or at least was) a component of commercial mouthwash.
Even when we don't make drugs out of the plant itself, it could have been used for the properties we know about today.
E.G: common vervain is known to have diuretic properties, so it's not a long shot to think it has been used for this particular reason at some point. Today we use diuretic to treat heart failure, liver cirrhosis, or hypertension. While they may not have had any way to catalog all this, it seems unlikely nobody ever associated the consumption of a lot of diuretic with people getting better for one reason or another.
People were not dumb, and there were a lot of them, for a long time. They likely tried a lot of combinations of things, on purpose or by accident.