When I worked there all the dangerous animals were locked up at night. Not just in case of incidences of them escaping but to prevent them injuring themselves in the exhibit, either accidentally or by fighting. Having them indoors at night means the keepers can check the animals first thing in the morning when they come in, and the exhibit is already empty so you can start cleaning it immediately.
On the odd occasion a chimp would refuse to come inside and would spend the night outside in the exhibit. But that was a rare occurrence and only a few chimpanzees were prepared to do that because they knew the repercussions the next morning.
Hix
Taronga had actually revised this policy with their chimpanzees by 2018 as they found tension decreased when outside access was permitted overnight. They also ceased separating males and females overnight:
Happy World Chimpanzee Day
Zoo husbandry is a constantly evolving profession and our management of Chimpanzees reflects that. When I first started working with chimps 25 years ago, we would separate males from females every evening, this was often an extremely lengthy and challenging experience for both Chimps and keepers. The reasoning for that was the globally accepted view that females needed protection from males overnight. We soon realised that this policy led to more intensive aggressive displays from the males the next morning, as individuals would strive to reassert their dominance. This led to a Taronga policy of keeping the Chimpanzees together 24/7.
A further evolution was the concept of leaving the Chimps with access to the outside habitats 24/7. This has resulted in a significant decrease in tension within the community.