The village that has sprung up around Petra is Wadi Musa (Valley of Moses), formerly known as Elji but now named after the valley it follows. It's a patchy mass of hotels, restaurants and shops stretching about 5km down from 'Ain Musa to the main entrance of Petra and a real tourist trap . The beauty is in the canyons so unless you are planning a dig a few days stay is all that is needed.
After the signing of Jordan's peace agreement with Israel & the Palestinian Territories in 1994, Wadi Musa became a boom tourist town, transformed almost overnight from a small town with few visitors and a traditional Bedouin society to a sprawling competitive place overrun by visitors laden with cash. Large numbers of Israelis began to visit, along with other tourists, encouraged by moves towards peace in the region. Some locals have coped with these changes better than others.
Many locals are aware of tourists flocking to Petra with big wallets and little time and this is one of the few places in Jordan where you'll get consistently overcharged.