Why is knowledge of bacterial pathogenesis important?
Because it is first important to understand a mechanism before you can think about using it for drugs. Take melanoma for example: A large subset of melanoma has a mutated and constitutive active BRAF kinase which permanently signals towards the nucleus and thus deregulates gene expression. Once this mutation was found it was possible to design inhibitors which only work on this specific mutation, which are available in the clinic today.

The same is true for example for activity of antibiotic on bacteria and the fight against resistance. Once it was known that the enzyme beta lactamase inhibits beta lactam antibiotice (penicillin or ampicillin for example) it was possible to find an inhibitor of the enzyme. The clavulanic acid works as a specific inhibitor and has been added to beta lactam antibiotics subsequently to overcome resistance. The same is true for changing antibiotic molecules chemically so they evade the established resistance mechanisms.

The contributions of basic research is the basis for applied research and drug design. Without them, this wouldn't work. Besides that it is also the curiosity of humans which drives science - without having any particular application in mind. These often come much later.