Most people use Petra as a stop on a longer route, not as a base for day trips — there is more than enough on the archaeological site itself to fill two or three days. The most obvious detour is Little Petra, 8 km north, which can be combined with the Neolithic village of Beidha in a half-day.
Further afield, Wadi Rum is 90 minutes south and is the natural counterpart — Petra in stone, Wadi Rum in sand. Shobak Castle, a 40-minute drive north, is a Crusader fortress on a hilltop with views into the wadi country. Aqaba is two hours south for a swim in the Red Sea and a snorkel on the coral reefs.