The actual programs in the spacecraft were stored in core rope memory, an ancient memory technology made by (literally) weaving a fabric/rope, where the bits were physical rings of ferrite material.
"Core" memory is resistant to cosmic rays. The state of a core bit will not change when bombarded by radiation in Outer Space.