I propose that they have heard of or saw the mighty deeds YHWH (the God of Israel) has done and they have decided to choose the winning God.
Rahab did the same when the spies came.
"Hey guys, I've heard of the might deeds your god YHWH has done, and I believe I'll choose that one as well!"...