At end of movie:
The Afghan villagers who protected Marcus did so out of duty to their 2000 year old code of honor known as Pashtunwali.
Pashtunwali requires a tribe to undertake the responsibility of safeguarding an individual against his enemies and protecting him at all costs.