It’s not a matter of legality but of honesty. They still committed fraud. It's like cheating at some exam. Might not break a law, but I wouldn’t hire them in a bank.
If I ran across a resume of someone who hacked a student election and a resume of someone who won it legitimately, I’d consider the hacker to be the more valuable and qualified applicant by a long shot for any STEM position. I am amazed that you have never done an unethical thing when you were a youth, but I know that my entire cs class in high school was finding exploits in the IT security structure and abusing them for fun.