When you hike, you train your body to work as it is designed. This involves lots of muscles all working in synergy, adapting to the situation as required. Gyms often lack this by exercising muscles in only one motion (take the classic bicep curl, for example).