Technically, you are correct whether or not you write the 4s or 3d first. The problem is that you may be asked which subshells will lose/gain an electron first, so the best bet is to memorize it as shown above.
The 3d would lose electrons first because the 3d energy level is higher than the 4s energy level. That is why it is best to memorize the energy levels in that order, otherwise you would be forced to remember:
The 4s subshell fills before the 3d subshell and
The 3d subshell empties before the 4s subshell
Another way to remember which energy level is greater is to add the n + l rule for quantum numbers and compare the energy level, ie:
4s = 4 +(0) = 4
3d = 3 +(2) = 5
With this method, you can quickly determine the difference between the energy levels and their relative gain/loss of electrons.
I remmeber it like this:
Lower fills first
Higher empties first