25 Then Joseph commanded to fill their sacks with corn, and to restore every man’s money into his sack, and to give them provision for the way: and thus did he unto them. 26 And they laded their asses with the corn, and departed thence. 27 And as one of them opened his sack to give his ass provender in the inn, he espied his money; for, behold, it was in his sack’s mouth. 28 And he said unto his brethren, My money is restored; and, lo, it is even in my sack: and their heart failed them, and they were afraid, saying one to another, What is this that God hath done unto us?
Joseph had given a strict command to his brothers. Either they could return with Benjamin, or they would never see Simeon again or be welcome back in Egypt. These facts give them a strong incentive to return with their youngest brother.
Now, though, Joseph tips the scales the other way. By putting the money back in their sacks, he gives himself a reason to accuse them of being thieves. Now, even if the brothers follow Joseph’s instructions to the letter, they can expect to still be in hot water. Thus, they are strongly incentivized to not return.
It seems likely to me that Joseph’s reasoning is to fully test their commitment to Simeon. Are they willing to come back for their brother, even when it is to their own peril, or will they abandon him for their own self-interest, just as they did with Joseph all those years ago? Do they regret what they did in the past, and have they changed so that they would not do it again? As it turns out, Joseph will have to wait a little while longer to get the answers to those questions.