Isn't it fascinating that the rules for living together in Exodus 21 - 23 are so focused on the material possessions that refugees would be unlikely to have? They really extend to what would be needed for an established community of farmers and herdsfolk. This is the kind of section that makes a good argument for not swallowing the Bible whole, so to speak, but for seeking the context and learning what history is available about the early documents. It's not unlike solving a puzzle.
And sometimes it's not a puzzle, but an image so universally human that when it was written down matters not a bit:
7The Lord said to Moses, “Go down at once! Your people, whom you brought up out of the land of Egypt, have acted perversely; 8they have been quick to turn aside from the way that I commanded them; they have cast for themselves an image of a calf, and have worshiped it and sacrificed to it, and said, ‘These are your gods, O Israel, who brought you up out of the land of Egypt! Exodus 32:7-8
Yep, been there and done that, in my own imaginative way. We human beings are still striving to get the message, aren't we?