She was convicted because she violated the law and we know she violated the law because she was convicted. Post hoc ergo propter hoc. The conviction was for that specific violation, not simply any violation that preceded it. It is not a coincidental correlation, as you falsely imply.
You determined that she had committed an "illegal act" because she had been convicted. In other words, her conviction made the act illegal. And she would not have been convicted had the act not been illegal. The act of conviction determines the illegality and the illegality derives the conviction.
One more time ...
Post hoc ergo propter hoc.