You're confusing two different things. One is the question of innocence/guilt (did you do X) the other is the question of legal/illegal (is it legal to do X). If you're found guilt of murder, that obviously doesn't mean that you committed a murder, but it does mean that murder is considered illegal.