There is a pit in the center of the cell to increase the sense of drama and terror. The prisoner is not executed immediately because if he had been, there would be no story. These answers might appear rather flippant, but I think some reflection will demonstrate that they are the best responses available.
To explain in a little more depth: Poe is creating the conventions of both the modern horror story and the modern adventure story. The first question is really about the former. Why is there a pit in the middle of the cell? It is to give both the narrator and the reader a shock. The narrator falls and finds that his chin is not on the floor. He has narrowly avoided a precipitous descent into nothing. The story is full of these narrow escapes, and they create the same type of excitement as the sudden attack from the side of the screen that is such an essential convention of the horror film.
Why is the narrator not executed immediately? This is one of the most frequently parodied conventions of the adventure story. The villain captures James Bond, and, instead of shooting him as a real villain would, he contrives an elaborate and fallible method of killing him, from which he can then escape. Ian Fleming did not take this directly from Poe. It appears in a great many nineteenth- and twentieth-century adventure stories, such as those of Guy Boothby or Anthony Hope, and in Sapper's Bulldog Drummond books. The convention has been so prevalent because it is the most dramatic and exciting (though not the most realistic) way of handling the situation.
There is an important ancillary point: the narrator asks himself the same question that the reader asks. Why are they doing this? What do they want? Why not just kill me? This uncertainty and the apparent irrationality of the antagonist both serve to increase the suspense.