The way it's set up, is there are 5 or so surfaces available for the menus. when the menu changes, so do all of the surfaces. I thought it would be a better option than keeping ALL of the surfaces for ALL of the menus in memory at the same time and just switching them out. Its a tradeout, cpu for ram, but both are so small that it doesn't really make a dent in either one way or another.
But yeah, NORMALLY you'd want to keep a surface in memory if you think it's going to be used again.
Memory is cheap. If something comes down to a question of memory vs cpu time, you should almost always spend more memory to save CPU time simply because you have so incredibly much space in memory.
Also keep in mind that most things with graphics involve communication back and forth between the CPU and GPU. I can't say for certain exactly how SDL is doing that surface modification, as it changes based on how you're compiling it (SDL is basically a shiny wrapper which incorporates a bunch of other graphics libraries like DirectX and OpenGL, then figures out which one to use based on how you use it/what system you're on). However, I
can say that the surface modification very likely includes such CPU-GPU communications; which tend to be very slow. Which is why doing it every frame was eating up several times more computation time than the rest of your code combined.
In this case, it's not too important, as it is just a menu opening (though you may get frame stuttering upon opening it), but just keep this in mind when using it in the future. Modifying surfaces, or worse, recreating them, is incredibly expensive.