Numbers 26

Numbers 26:55

"The land shall be divided to the names by lot, they shall inherit according to the tribes of their families."
Do these passages endorse gambling?

Are these endorsements of gambling? Only by the loosest possible definition. The moral issue in modern gambling typically involves the squandering of resources and exploitation. In this context, however, there were no "losers"—everyone received a parcel of land. Furthermore, in the ancient world, casting lots was seen as a method of entrusting the outcome to the sovereign will of God, making it a solemn process rather than a vice.