The police do not have to make an arrest right away. They have until the statute of limitations runs out on the charge to investigate and do so. In this instance, The statute of limitations on a misdemeanor in Colorado is 18 months. So the police were still within the time frame to get charges pressed, and delaying doing so is not unlawful. It's likely that the waited to have the drugs formally tested before turning the case over to the prosecutor, because if it didn't test out, there would have been no crime.
That said, though they can file an arrest later the way they did, your girlfriend would appear to have search issues. They may have had a reason to stop her and check out the situation, but the search of her purse without her consent or apparently without any other exception to the warrant requirement would appear to be unlawful.
Your girlfriend has the right to go to trial and fight this case if she wishes. She is not required to take a plea, just because her lawyer thinks it a good idea. And her lawyer will represent her at trial and get her the suppression hearing if she actually insists upon it.
The US Supreme Court has ruled that there is no hard and fast rule about what is or isn't Constitutional. Claims of an illegal search and seizure must be ruled upon on a case by case basis at suppression hearings, and the determination made according to each case's facts and circumstances.
The standard that the court must use to judge such a hearing has also been set down by the Supreme Court. It is what a reasonable officer would do under the same circumstances. If the judge finds the search unreasonable, the evidence improperly taken could be suppressed, meaning it can't be used against your girlfriend. Without the drugs, there could be no possession case. Her possession charge would have to be dismissed.
In fact, however, suppression hearings are not easy to win. Judges give a great deal of deference to the judgment calls of police who are out in the field. So if the officer has any good and credible basis for his search, the judge is likely to find the search lawful, and the contraband will come in against your girlfriend. No pre-trial suppression hearing is ever a slam-dunk for either side, no matter how good the issues may be for either side.
Am I telling her to take a plea? No. I'm not her lawyer and don't have nearly enough information to do that. Nevertheless, if the plea is a good one, she shouldn't be too quick to rule it out. Suppression hearings are held at the very end of a case and if she loses the hearing, she will lose the favorable offer that she has now, and she will go right into jury selection. It goes without saying that if she loses the hearing she won't have a very good trial case, because she did have drugs in her bag.