It's like asking, shouldn't the CEO be representing the interests of the shareholders? In theory, but it's a classic principal-agent problem. The agents have different goals than the principals and can be expected to try to game or corrupt whatever system is in place to make them accountable.
The trouble is that the accountability system in government doesn't take that into account. The state's attorney is presumed to be representing the interests of the public, so nobody is provided to argue the contrary position when the state's attorney ignores his duty by advancing the interests of the state instead.
The trouble is that the accountability system in government doesn't take that into account. The state's attorney is presumed to be representing the interests of the public, so nobody is provided to argue the contrary position when the state's attorney ignores his duty by advancing the interests of the state instead.