My suspicion is that the OP's rifle already had corrosion on the steel and which was hidden by the paint job. The gun was probably not prepped in any way before painting. Cleaning the rifle just knocked the paint off. Nothing to do with whatever cleaner used on it.
I have used brake cleaner on my guns, all of them in fact for at least 15+ years. All my M1911s, glocks, SIG, H&K P7/PSP, P7M8, P7M13, Ruger, Browning, AR15, Shotguns, whatever. One of my shooters is in the $4k range and several more are in the $2K+ ranges. I don't use it on wood and I don't use the types with chlorine in it but that's it.
Brake cleaner is the same stuff as Gunscrubber, they are formulated to remove carbon deposits and oils/grease. What magical ingredients do you think is in Gunscrubber? Go ahead and drink company Kool-aid if you want, guns are made for war, they are made to suck-up anything industrial and work.