The keyword here is net work.
Earlier in the exercise the author computes the work (no "net") the hiker has done on the backpack, which is the expected amount depending on altitude difference and mass. That's what the hiker did.
Now for the net. The hiker can attest that gravity is a bitch: It counteracted the hiker's force on the backpack the entire time! Witness to that is that the backpack didn't accelerate (if for simplicity we consider a stretch in the middle of the hike). No net forces, no change in kinetic energy.
The work the hiker did didn't end up in the backpack, it ended up in the gravitational field, in what Newtonian physics calls "potential energy". A similar situation would arise if a worker pushed a box across a cement floor, with constant velocity. They certainly perform work, also in the physics sense; but none goes into the box: The forces on the box cancel each other out! All the mechanical work is transformed into heat.
An opposite example would be the same scenario, but without gravity: The hiker displaces a weight with a constant force F over some distance s. Because there is no gravity, we have a net force: It is exactly F, and it all goes into kinetic energy, which is simply F*s if the force pointed in the direction of travel. (Because we have a net force, the backpack also accelerates all the time, as opposed to the gravity scenario.)