When Yehoshua came to Israel, he conquered it and divided it among the Jews. This land belongs to them and their descendants.
When the Jews were exiled many years later and came back (by the 2nd Beis Hamikdash), how were they allowed to live in any part of Israel? Land isn't stealable, and the land still "belonged" to the original owner.
Moreover, even if there was some kind of takana then (as there was a full Sanhedrin, prophets, etc.) how would Jews be allowed to move to Israel later on (say in the time of the Rishonim until now)? It could have had owners in the past?
Even if one can say that "Hamotzei Mechaveiro Alav Haraya", it still doesn't answer how can one lechatchila live in a place which he knows is definitely not his.
How does buying my house from the state (or JNF, or whoever owns the "unused land") affect acquisition from its original owners?