I'm going to need to rewatch it to take notes, especially of how the characters react to each other and various revelations. But here is some reasoning based on what I remember from the first viewing:
There are two theories here. The most popular one is the clone theory. The machine worked. Clones were killed. The other theory, which I favour, is the illusion theory. The machine never worked. It was all an elaborate con by Algiers.
First, note that all the stuff about clones is coming from Algiers' diary. It was a fake diary written as an insult to Borden, the very epitome of the unreliable narrator. The cats and hats? Either deception by Tesla or fiction by Algiers. The scene where Algiers saw his first clone and shot him? Pure fiction. Algiers was fooled by Borden and then conned by Tesla, but he turned it around to take down Borden.
Algiers was fully committed to the deception, and the audience was Borden, not the people who came to see his show. He went as far as having blind men move a water tank away at the end of every show. This was misdirection from the truth -- that Algiers had brought his double back into the act. Borden couldn't believe Algiers would do such a thing because of how disastrously it went for Algiers the first time around. He also knew that Algiers hated having to hide beneath the stage while his double got all the applause. Borden needed only a small push to get him searching for another answer -- thus the water tanks.
I'll have to watch it again, but I remember Algiers telling Cutter that he didn't want him backstage "this time", for the last performance. It implied that Cutter had been there before, but this particular performance was special. It would be the last performance, the one where curiosity got the better of Borden and end with him framed for murder.
On the question of the body double, Root. There are plenty of reasons why he would agree to work with Algiers again, and reasons why Algiers was willing. Money is the easy answer. Another is that Root was not a willing participant when Borden trussed him up and made him a fool. Root could have been resentful that Borden had manipulated him and caused him to screw up a decent job.
The first time they worked together, Algiers was resentful that he was not the prestige part of the act. Root, on the other hand, was unhappy that the others didn't think he was capable of leading the act (Cutter commented that they would be found out as soon as Root opened his mouth). But we already got a taste of Root's acting ability, and he rattled off a list of past roles he'd played. I think he very well could have been a capable actor. Algiers let Root back in for Roots to prove his ability and for Algiers to get his chance to shine in the prestige. And of course, Algiers had further ambition -- to enact revenge upon both Root and Borden.
Cutter ID'd the body at the morgue, but he was too sad to look too closely. He realized the truth when he found Algiers alive. He was disgusted at Algiers then. He had come to beg the lord to destroy the machine, but he would do so no longer because he realized it was all a fraud. The machine never worked.
Finally, all those dead Algiers at the end. I have two possible explanations right now, and I think there could be others. One is that the bodies are fakes, maybe wax doubles, placed in the theatre by Cutter as admonishment for the murder of Root. Heck, one of them might have been Root himself. "Look at what you've done, Algiers!"
The second possibility is that they are fakes brought them by Algiers himself. Algiers was at the theatre to destroy the machine to get rid of evidence -- specifically, the evidence that the machine was nothing more than a sparkly prop. Algiers was so committed to the clone deception that he not only had blind men moving water tanks, he even put fake doubles of himself in those tanks in case Borden went so far as to sneak a peek. Now that his scheme was complete, all the fake bodies were brought back so that he could dispose of everything cleanly.
I think all those bodies are actually a point against the clone theory. Suppose he really had been killing clones every night. Why in the world would he have them all moved back into the theatre? Actual human bodies would be far more difficult to dispose of than wax duplicates. He would have found a way to get rid of them each night.
And finally finally, there is a meta argument. The closing narration says:
Now you’re looking for the secret…
But you won’t find it…
…because you don’t really want to know…
…you want to be fooled.
We are looking for the trick to the film, but we won't find it because we don't really want to know the truth. We want to be fooled into believing the solution right in front of us -- that the machine was real all along. But the secret is that it was just one big con.