Mayella has committed crimes against Tom and against the state (false accusation, lying under oath, even ‘murder’ of an innocent man) because she is ashamed of breaking a “code” and “tempting a Negro.” What’s the difference between a law and a code? In your opinion, which is more powerful?
Laws, perhaps, are more powerful because they can interfere with the natural progression of one's life. Tom Robinson's life, and that of his family, was forever changed because he "broke" the law. The law deals with the lawbreakers, and then it's over. However, codes are more powerful because they sometimes dictate how we live our lives and the consequences of violating them can destroy our life. Mayella broke the code. She tried to sexually entice a black man. This would have, forever, been held against her and her future generations no doubt. Society deals with codebreakers, and this can sometimes go on for generations.
Certainly, the code of her white society is one in which Bob Ewell firmly believes because it is the only thing that provides him with any superiority. Since her father values this societal code for this reason, Mayella understands the consequences of her actions with regard to her relationship with her father. If she brings him further "shame" in public, there will be dire consequences. Therefore, she perjures herself and falsely accuses Tom in order to prevent public ostracism and further physical abuse from her father. Breaking the law is of much less importance to Mayella than preserving her own life and home, be it ever so dysfunctional.
A law is a formal rule that is enforced by the government. A code is an informal, unwritten rule that is enforced by society as a whole. Codes are more powerful, in my opinion, because people don't want to be shunned by society in general.
Take, for example, the rule that says you shouldn't allow a friend to cheat on school work. The code says that you must allow friends to copy your work if needed. For most people, the code wins out because they do not want their peers to think badly of them. That is exactly the case with Mayella. The law is imposed by outsiders. The code is something made up and enforced by her peers. Therefore, the code carries more weight in her mind.