Where did Louis Pasteur get his ideas from?

because micro-organisms got worse and worse so he wanted to get rid of them and also wanted to get rid of bacteria.