I think it is important to consider that a little more is going on than just lying under oath vs. a black man in contact with a white woman.
#1: She lies under oath because it is actually her father who is guilty here. Obviously we can't know if she does this to protect him or because she fears him. A little of both? This is almost forgivable by today's standards.
#2: She is not simply a white woman in contact with a black man. She makes sexual advances on Tom. She, in fact, kisses him. This is what is so shameful. And she does it because she is so lonely, dejected, insecure (something), that this is the only man she can get attention from. To Maycomb - it is shameful because he is a black man. But it it might also be considered shameful today because he is married.
Even by today's standards it is easy to see which "crime" would be considered more serious.
The law that Mayella breaks is the law against perjury. She gets up on the stand and tells a lie.
The social code that she breaks is the code against having black men and white women in contact with one another.
I think that it is quite clear that the people of Maycomb would consider the breaking of the social code to be much more serious. This is because their whole society is based on the separation of white and black people. By breaking that social rule, she is undermining the foundations of their social order. Lying in court does not do that.