Unfortunately, there are reasons to accept a plea bargain even if you are perfectly innocent.
First, reality is not important per se, only how the judge and the jury see it. If you know you didn't do something, but there is evidence pointing towards you, and you have a reason to believe that people judging you would be convinced by it... it makes sense to accept a smaller punishment (for something you didn't do) rather than risk years of prison (for something you didn't do).
Second, the process itself is already a punishment. How many times can you be absent from your job because you are at the court, before you lose the job? How much will it cost you to pay for the lawyer, for travel, etc. If you are poor, it can make more sense to accept a smaller punishment for something you didn't do, rather than ruin your life in an attempt to prove your innocence.