Typically, the prosecution pursues charges with enough evidence to back them up. In other words, the prosecution will look for a legally sound case. If a case contains some kind of inherent flaw, it probably isn't worth pursuing. Then, prosecuting attorneys decide whether or not there is enough evidence to pursue a conviction. If there isn't, the case will probably be dropped, or another charge will be considered. Enough evidence is determined by the quantity of the evidence held against you and the quality. For example, if the prosecuting attorney has a large quantity of questionable evidence, they probably still won't pursue that particular case because of its potential holes. You can only be prosecuted once per alleged offense, so prosecutors have to be careful when deciding when to act.