Anerias' group almost ran past the exit multiple times in their search for it. They had reached the end of the Basilisk's natural intestines. The only way forward was by cutting things open, which they considered since they had to get up and out. But while they could get through the Basilisk's insides with relative ease, they could not get through its outer skin, even after it was dead.
They had to use a preexisting opening to escape the Basilisk's body.
However, it wasn't like the Basilisk's 'exit' was gaping open all the time. It only needed to be open when it emptied its bowels, which it hadn't done in at least decades or maybe even centuries. It was sealed shut like a bank vault.
It was only after scouring the walls of the Basilisk's intestines several times and going by where it should be that the students found a few wrinkles and an area that was a little off compared to the rest.