So what protected the Apollo astronauts in not only their flight to the moon but their walk as well?
Not much, except that they were only outside our magnetosphere for less than a few days. They accepted that they were going to receive higher radiation, and were gambling that there would be no spikes in radiation from solar activity.
Serendipity in that they dodged exposure to a nasty solar flare. Exposure from background deemed acceptable for military crew volunteers flying the missions.
Time.
Mars will take a couple days longer to reach.