It can matter. For example, if you pack three meals and snacks per day, but still have to few calories, you'll be sluggish and have a hard time hiking since you have insufficient fuel. If you have a lot of calories, but say not enough carbohydrates, then you could have a similar effect.

In winter, having enough fats is very important, since your body's metabolism is a key factor in staying warm. Sufficient calories and fats help keep it firing all night, which helps you get a nice, warm night's sleep.

Food if fuel, so yes, it is important what the nutrients are and how much. At least, that's always been my take on it.

Tom