14 So the men took some of their provisions, but did not ask counsel from the LORD.
15 And Joshua made peace with them and made a covenant with them, to let them live, and the leaders of the congregation swore to them.
The nearby people of Gibeon had heard of Israel conquering the land so convincingly and killing all the pagans they encountered. They realised their turn would be soon, so hatched a plan to trick Israel into making a covenant with them in order to save their lives.
Israel saw their provisions, which were carefully crafted props by the Gibeonites, made to make Israel think they came from a long way off, outside of the promised land. They made an agreement with the Gibeonites hastily and without consulting God. They were thus tricked into an agreement to let them live.
We can learn from this that we should consult God in prayer or through wisdom in the bible (or from wise Christians) before making any decisions - especially big decisions.
Scripture doesn't speak of it, but one might wonder why Israel felt that they should honour an agreement with a people who entered into it dishonestly. We might suppose that they were in fear of upsetting God by breaking their part of the bargain, yet they have forgotten that their first agreement (which should take priority) was to God to wipe out the idolaters in the land.