Personally, when I've hiked 20 miles without seeing any trash and then there is a piece, (1) it typically is a little scrap that most likely got dropped accidentally as someone pulled out a bandana or some such, and (2) it is jarring enough to see it and more upsetting to know if it remained there after I passed. Sure, it "belongs" in someone else's pocket. But I'd rather it was in my pocket than on the trail.
We are social creatures. Most people comply with most societal norms. If the norm (as evidenced along the trail) is "some people litter" then lo and behold, some people will litter. Whereas in places where "essentially no one litters", then almost no one litters. So I skew the results. I try to make hikers, collectively, look better than they actually are. A small fraction of people doing a little more than their share can change the mindset of the masses. I've seen behaviors improve over the decades (not perfect, but improved) about litter, cutting live trees, fire circles, not cutting switchbacks, etc despite there being many more people on the trail now.