As your planned hike gets longer and longer, the possibility of carrying adequate food and, most importantly, water, for the entire hike diminishes. If you're exerting yourself and if the weather is warm or hot then it's not easy to carry enough water for more than a day or two. Most people find it much more pleasant to carry a lighter load and resupply regularly.
If you're walking in remote and unpopulated areas, it can be difficult to find water and food. But in most areas, water supply is not far away. Where there are people, there should be access to food and water. In towns and villages, you should be able to purchase what you need. In very remote settlements, you may find yourself asking individuals for water if none can be purchased elsewhere. The more remote your location, the more important it becomes to plan resupply locations ahead. It's a miserable and dangerous predicament to run out of water and not know when or where you will be able to find more.
A street vendor in the Huairou urban area
Your primary choices for buying food and water include stores, restaurants, and street vendors. Stores have the advantage of offering packaged foods which can keep for a long time. They also are likely to have a variety of drinks other than water, such as orange juice, iced tea, electrolyte drinks, and more. Restaurants are a good choice; you get to eat a good, fresh, nutritious meal and then take an additional one or two with you. Many restaurants will give you water free of charge, especially if you're buying some meals from them. Street vendors will often have a selection of packaged foods and various drinks which may rival the selection found in smaller stores and can be bought for a fair price. Remember to negotiate a favorable price, especially if you are buying several items.
Planning a walk on the Great Wall, like travel planning in general, is a two-edged sword. On one hand, the more involved and challenging your intended walk, the more planning is needed in order to achieve your goals without undue hardship. On the other hand, even the simplest trip to China is likely to present unexpected situations. For a complex trip involving significant Great Wall hiking, unplanned occurrences are all but guaranteed.
The likelihood of these surprises does not mean that it's not a good idea to plan. On the contrary, you can expect the vast majority of your plan to materialize as you envision. But at the same time, you should plan for the unexpected. That way, when you're thrown a curveball, you'll be ready for it.
Unplanned events are not always bad. They can have a positive side, and, as long as you have the right mental approach, you can often enjoy and benefit from them. In fact, unplanned things often end up being some of the most memorable parts of a trip.
Don't make plans that have little tolerance for problems. Very short layovers in airports, very tight bus connections, and the like are just asking for trouble. If you must make plans like these, make contingency plans as well in case of the genuinely likely event that your primary plan falls through. Having a backup plan will make things much smoother when your nominal plan fails.
In order to be prepared to handle the unexpected, try to maintain a positive attitude. Don't let delays or problems annoy you unduly. If you expect them to happen, then when they do, you won't be surprised. Cultivate an adventurous spirit. When a detour or a change of plans becomes necessary at the last moment, look for the positive aspects and enjoy the experience. Travel with a good sense of humor. And be tolerant of differences in people's culture and habits. Remember that you seem different and perhaps strange to them too. If someone does something you don't understand, try to understand instead of just reacting. Getting upset at an unexpected problem or delay makes the situation much worse than just laughing at it and enjoying yourself regardless of the effect on your plans.