A MAN MAY CAST LOTS WITH HIS SONS AND THE MEMBERS OF HIS HOUSEHOLD FOR [SERVINGS ON] THE TABLE, PROVIDED THAT HE DOES NOT INTEND TO OFFSET A LARGE PORTION AGAINST A SMALL ONE.
Only with his sons and household, but not with strangers: what is the reason?
According to the tradition reported by Rab Judah in Samuel’s name, it is because when people travel together they are careful about sharing provisions fairly, by weighing and measuring each member’s contribution – and thus will violating the Shabbat.
So what is the problem with large portions being set against small ones? In fact the rabbis forbid it even on weekdays! Why:
On account of gambling
It looks like a gambling game. The text doesn't say so, but "casting lots" reminds us of Purim! It was Hamen's game. We don't play it.