Corrosive ammunition used chlorate based primers. These primers were stable, performed great, might be cheap to make. The US military used these primers up to the 60's, most were out of the system by the mid 50's. Communist block counteries may still be using chlorate primers.
The chlorate primers leave cloride salts in the barrel. Salts attract water and aggressively spread rust. Salts won't dissolve in oil so users of corrosive primers must use a water based cleaner, or water, to get the stuff out of their barrels.
FA 70 was a widely used rifle primer compound. As you can see, everything else is based on lead styphnate, which are the current "non corrosive" primers.
Your barrel will still rust if you don't clean it out, just takes longer.