The Lord promised a certain piece of land to Caleb, and he approached Joshua about the land, and he gave it to Caleb. The Bible explains why,
And Joshua blessed him, and gave Hebron to Caleb the son of Jephunneh as an inheritance. Hebron therefore became the inheritance of Caleb the son of Jephunneh the Kenizzite to this day, because he wholly followed the Lord God of Israel. And the name of Hebron formerly was Kirjath Arba (Arba was the greatest man among the Anakim). Then the land had rest from war (Joshua 14.13–15).
Caleb followed the Lord completely, and for that the Lord blessed Caleb with what he wanted, even if it meant overcoming the greatest enemy in the area.
Follow the Lord with your whole heart and watch what He does.