Aside from alpinism/mountaineering, there are many scenarios where people might want a lot of food that doesn't weigh too much. Long journeys like through-hikes, mountaineering, or voyage by train or ship all have similar requirements so I'll try to provide an answer that works for all of them.
For lightweight food that lasts, the primary objective is to select dry food, for two main reasons.
- Weight. Water can contribute a huge amount to the weight of food, but it never contributes to the energy content of food. Consider 100 kcal worth of walnuts and watermelon; 100 kcal of walnuts weighs 15 grams but 100 kcal of watermelon weighs 330 grams. The watermelon weighs 22x more for a given amount of food energy.
- Decay. Water content of food is a critical factor in determining whether it will decay. High water content greatly increases the likelihood that food will rot, or decompose, or becoming a breeding ground for bacteria or fungus or other organisms. Low water content also helps make food durable against freezing.
Fats (lipids) are highly desirable in these cases. We might intuitively think of fat as being wet because oils are a liquid at room temperature and fat content is often connected to the perceived moistness of food, but it can really be considered as dry because fats are very lightweight (for a given amount of energy) and don't contribute to decay the same way that water content does.
So to finally answer your question, you'll want to select foods that either start with a low water content or are suitable for dehydration to reduce the water content.
- Dry foods: nuts, pulses (lentils & beans), flour-based goods (bread, crackers), candy, dates, grains, refined oils.
- Foods that can be dehydrated: most fruit and vegetables, peanut butter, chickpeas.
- Some companies produce entire meals that are already dehydrated.
- Butter is very energy-dense and suitable for lacto-vegetarians.
- Packaged and powdered foods like Soylent or Huel.
Of course, some of this food is going to take a bit of work to make it palatable. You'll need to work out a plan on how you'll obtain water, and depending on your specific activity, you may also need a way of preparing food to rehydrate it. For alpinism and long hikes, making a stew is one of the easiest ways to rehydrate dried foods. For unsupported journeys in the outdoors, you'll definitely want a water purification system that allows you to use the water you collect along the way. Any water you can get this way is water you don't need to pack.
You mentioned tofu in your question, but tofu is not a very good choice. Tofu is only about 1.1 kcal per gram, and you really want to be selecting foods that offer at least 3.0 kcal per gram (as a rough benchmark).