It's not that they want to imprison innocents; it's a prosecutor's job to get the defendant convicted no matter what, whether or not they personally believe the defendant is guilty. They are simply acting as their job calls for (the conflicting prosecution and defense attorneys in theory bringing about the truth), because until now you could never be 100% sure. '100% sure' and 'our legal system' do not go well together.
P.S. Don't invoke the argument over the ethically wrong claiming 'oh I was just doing my job'- this is different; we WANT the prosecutor to behave like that, even if he feels or even knows the defendant is innocent. It's what (in theory anyway) makes the system work.