Which entity is they this sentence?

The pyramids are a maze which contains a great deal of treasure, so they constantly attract treasure hunters exploring the depths.
The pyramids