The majority consensus is that they housed the guards that defended the main entrance to Petra.
The consensus among experts is that these individuals were responsible for guarding the main entrance to Petra.