What is the primary purpose of installing trench boxes during excavation work on a construction site?