What is the evolutionary reason behind human preference for salty foods?
The body needs more than energy to survive.

Salt is vital to the body's function. Ions of sodium and calcium perform numerous vital functions, but are particularly related to the function of the nervous system and contraction of muscles. Accordingly, seeking out sources of salt makes sense in a natural environment in which salt is relatively unavailable.