I also use diesel fuel for cleaning parts, it leaves a little bit of a film that seems to prevent rust. If that is later cleaned off with other solvents like gasoline the parts can rust very quickly. It seems to me that cleaning with hot water and strong detergent also leaves a surface slightly resistant to rusting, someplace between the diesel and gas. I don't know about the chemistry of cleaning with detergents but the paint cans often specify it.