How many generations does a people need to occupy a certain place before it becomes legally theirs then? They colonized a planet no one else had a claim for. Just because it came within the Federation's sphere of influence hundreds of years later, it doesn't give them the right to deport the Ba'ku. The Federation shouldn't behave like the 16th century Spanish and Portuguese, freely and legally destroying colonies of other states built on virgin lands merely because the Pope drew a straight line on a globe and said "this part belongs to you now."
I'm not saying it's an open/shut moral issue at all in favor of displacement. However, the way that the story is structured clearly is meant to have us empathize with the desire of a single village of privileged white folks to live in their slice of rural paradise over a technological advance which could positively impact the lives of billions of people. It's really not all that different from a handful of rich people in mansions blocking a project which benefits the greater public (highway, public housing, wind farm, etc..) because they are the local property owners and believe their own rights trump those of anyone else.
And yeah, I suppose the difference here is those wealthy people in mansions would be part of the same nation as those whose lives would be improved. But people always argue local self-determination when it comes to zoning (at least in the U.S. context) regardless, so I think the analogy holds up.
Again, they could have told the story here well, but the choices they made in terms of storytelling destroyed the intended message about respecting the rights of primitive indigenous people.