Have you ever bought “a pig in a poke”? Probably not literally since it’s a phrase going back to the middle ages when people would go to the market and buy a piglet from a traveling merchant. The merchant would offer to hold the pig until their shopping was done. When they came to pick it up it would be tied up tight in bag (poke). The unwitting buyer would get home, open the bag and find a cat instead (source of “let the cat out of the bag”). By the time they got back to the market the seller was long gone.
Balak certainly thought he bought a pig and got a cat instead. He hired the prophet Balaam to curse Israel, but they were blessed every time Balaam spoke. It made Balak so mad he refused to pay Balaam. See Balak thought God (or more properly for him – gods) were for sale. They did whatever the buyer wanted. He didn’t understand Yahweh or true prophecy.
Like it or not often we’re not any better. If our religious discussion begin with I then we worship a small g god. If worship is about what I like or don’t like as opposed to what God said then we’re just like Balak. If we bought into a God who lets us do what we want when we learn he demands full obedience we probably won’t even open the bag.