If you take it as "Waaa I'm being punished." You are taking on a victim mentality because you believe you are guilty.
When you know you are innocent, the prosecution process is THEIR pinishment, because they are using up their own resources only to lose the battle.