More complicated than that (at least on the Tanya McDowell case).
First, she got arrested for larceny (this was the case where she attempted to get her son into the district).
Second, while she was being tried for the first case, she got arrested again for drug dealing and prostitution.
Third, what appears to have happened is that prosecutors used the first case as leverage to accept a shitty plea deal on the first case.
This is how it appears, at least, in Snopes. Prosecutors exploited what I would argue were poor decisions to really mess her life up. Felicity Huffman, by contrast, appears to have been more targeted in her criminal behavior (whether by being more devious or by simply having fewer motivations to break the law) and that, combined with better financed defense teams, put her in a much better position, regardless of what anyone thinks about the comparative severity of their crimes.
Racial Privilege: If you squint. Depends, really, on the point you are trying to make, and the actions you are trying to inspire.