*mega nerd hat on*
I'm pretty sure it was Sauruman that had explosives, and he was aligned with Sauron, but mostly in secret. He might have been keeping things close to the vest because he was contending with Sauron for a while. Also, the explosives were likely a bit magical in nature, and not easily adapted to mass production.