There are a lot of advantages to carrying protein powder with you on a hike. There is a high calorie-to-weight ratio, with 100 grams of powder containing more calories than you would find in foods that weigh a lot more.
Protein powder is also unlikely to be affected by being stored in cramped, humid conditions for long periods of time. Making a protein shake is easy, not requiring fire or cooking utensils, just a protein shaker.
Protein powder is also highly satiating, meaning that it will leave you feeling fuller for longer than many foods. Protein can also be used to preserve muscle mass while in a calorie deficit. Not a big issue if you are on a one-day hike, but potentially important if you are hiking for multiple days.
While protein powder has its uses, it also has some downsides. Long-duration exercise cannot function on protein alone. You need carbohydrates. These provide you with initial energy as well as sustained energy, particularly if the carbohydrates are complex and contain a lot of fiber.
Protein powders are also quite low in calories compared to a full-sized meal. A typical lunch is around 500-700 calories, and a protein shake is usually around 200 calories. You could triple the dosage, but that is a lot of protein to deal with, which can have unpleasant side effects. It would also be hard to digest (protein is the hardest macronutrient to digest).