Consider the relative size of the calcium and magnesium atoms......
We examine the energy associated with the following rxn:
Without knowing anything else but that the magnesium atom is smaller than the calcium atom (and how do we know this? By the position of magnesium and calcium on the Periodic Table), we would predict that
The valence electrons of calcium are farther removed from the nucleus, and thus, even though the calcium nucleus has a higher nuclear charge, we would expect ionization of calcium to be more facile.
But we are chemists, i.e. physical scientists. We need data to interpret. See this site, and see if the data are consistent with the rationalization we have advanced here.