Well a mixture of kerosene and silica gel keeps atmospheric water out.
Rust is oxidized iron. So it is redox chemistry;
Fe(s) <--> Fe2+(aq) + 2 e-
4e- + 4 H+(aq) + O2(aq) <--> 2 H2O(l)
No water -> no ionic product -> no H+
One line answer is;
Kerosene and silica gel suppress the corrosion of iron by exclusion of oxidizing agents.