God commanded Israel to make no treaties with other nations in Canaan.
When Moses was upon Mount Sinai receiving the second set of stone tablets, GOD instructed:
10 The Lord then said to Moses, “Behold, I am establishing a covenant with you. Before all your people I will do marvels such as have not been done in all the earth, nor in any nation; and all the people among whom you are shall see the works of the Lord, for I will do awesome things for you. 11 Observe what I command you this day. Behold, I am driving out from before you the Amorite, the Canaanite, the Perizzite, the Hittite, the Hivite, the Gergesite, and the Jeb-usite. 12 Take heed to yourself, lest you make a covenant with the inhabitants of the land where you are going, lest it be a stumbling-block in your midst. 13 But you shall destroy their altars, break their sacred pillars, and cut down their groves; and you shall burn the graven images of their gods with fire 14 (for you shall worship no other god, for the Lord God, a jealous name, is a jealous God), 15 lest you make a covenant with the foreigners of the land; and they indulge themselves in gross immorality with their gods by making sacrifice to them; and they invite you, and you eat of their sacrifices; 16 and you take of their daughters for your sons and give your daughters to their sons; and your daughters commit fornication with their gods, and your sons commit fornication with their gods. 17 You shall make no molten gods for yourselves.
(Exodus 34:10-17 OSB)
GOD knew that, for Israel to remain holy to Him, they must purge all pagan Canaanite influence from the land they were entering. Thus, He specifically warned them not to establish any treaties or covenants with those people.