A defendant can make a plea bargain to prevent the court from charging as harshly. Plea bargains occur before a trial, which can be helpful in some cases because it removes the stress of having to defend oneself in court.