There's various ways to go about morals in general but "following the rules" in itself is not a good basis for morality.
Actually, there never was a time where I felt that cheating was worth it. On the contrary, the amount of time I'd need to prepare a strategy (compile cheat sheet, figure out how to use it, where to sit, etc.) probably exceeded the time I'd take to just study for the exam!
I agree, always following the rules isn't beneficial to society, but I'd argue it's better than the case where no one is following the rules.
And note that I was talking about a cheat sheet to be used for cheating.
Plenty of smart people follow the rules on principle and plenty of rule-breakers are dumb. Notably, many students who cheat has to cheat, because they are unable to learn underlying material.