Some pathogens simply do not die in any useful timeframe, e.g. anthrax or tetanus. Those lurk in the soil for years, decades and even centuries.
The only safe measure is heat-treatment, but that is usually too expensive. In particular, it is more expensive than just using artificial fertilizer.