The thing you are mining is actually very rare, and although it could be elsewhere, it’s the only place you found it. This is the case in Avatar. The Unobtanium they are mining is not found anywhere else.
It’s easier to mine on a habitable planet. You don’t have all the extreme difficulty of operating in space or a planet/moon with no atmosphere. In Avatar workers can freely operate without any special equipment, using just a gas mask, and don’t need to be astronauts.
You are assuming they found Pandora to mine on it. They probably found it through scientific research, and the mining angle only appeared later when the resource was found.
Another important detail is that in Avatar they don’t have any faster than light tech. Pandora is in the Alpha Centauri system, the closest star to the Sun, and it takes years to get there anyway. Sure, there might be lots of better places to choose, but it’s literally the only habitable body in reachable distance from Earth unless you want to spend decades flying in one direction.
There could be many reasons:
Another important detail is that in Avatar they don’t have any faster than light tech. Pandora is in the Alpha Centauri system, the closest star to the Sun, and it takes years to get there anyway. Sure, there might be lots of better places to choose, but it’s literally the only habitable body in reachable distance from Earth unless you want to spend decades flying in one direction.