What was divided via the lottery?
Malbim: It was only the portion for the entire Shevet, but not for people within the Shevet.
Where did Hashem command so?
Malbim: "Ach b'Goral Yechalek Es ha'Aretz" (Bamidbar 26:55).