There are a number of reasons that we take gear, most being about survival at an acceptable level. It would be hard to do an extended walk with no shelter, sleeping mat or sleeping bag.
Some gear may be considered optional, either to take or to what degree. For example, most people carry a first aid kit. If a first aid kit is carried, how big does it have to be? Are the contents based on the probability of an event, or the consequences of not having, say, pain killers? On extended walks I have a small sewing kit, mainly due to consequences. On one trip the car dropped me off and I walked for a few minutes to the campsite. As I put the pack down a shoulder strap ripped out, which I then repaired. The consequence of no shoulder strap is serious, and this trip was 10 days. I have a sleeping mat repair kit, never used in maybe 20 years. If the mat gets a puncture it's uncomfortable to sleep on, so I have the means to fix it.
I'm interested in what might broadly be called optional items. Do you take these items due to the probability of needing them or the consequences of what would happen if you did not have the items and they are needed?