Scout feels sorry for both Tom Robinson and Mayella Ewell.
Scout considers both Mayella and Tom Robinson victims of society. She feels sorry for them because she understands that they are both caught in the same web of societal discrimination.
When Mayella takes the stand, Scout describes her as “fragile-looking” and notes that she tries to keep clean. She also wonders why her life was like, and feels sorry for her when she describes it.
Scout is aware that Tom Robinson is a patsy, a victim of circumstances. She may not understand the finer points of the trial, but she knows Tom could not physically have committed the crime.