It definitely does seem that prosecutors (at least as portrayed in fiction) make these character judgements that lead them to formulate prosecutions not on the basis of "this person committed this crime, can we get [them] for it", but rather "this person is a bad apple, what can we get them on?"