https://en.wikipedia.org/wiki/United_States_v._Swartz#Plea_negotiations
Swartz's attorney, Elliot Peters, stated that prosecutors at one point offered a plea deal of four months in prison and pleading guilty to 13 charges, and warned that if Swartz rejected the deal, future deals would be less attractive;[45] and that two days before Swartz's death, that "Swartz would have to spend six months in prison and plead guilty to 13 charges if he wanted to avoid going to trial."[46] Under the six-month deal, after Swartz pled guilty to the 13 charges, the government would have argued for a six-month sentence, and Swartz would have argued for a lesser sentence; the judge would then be free to assign whatever sentence the judge thought appropriate, up to six months.[47] Peters later filed a complaint with the DOJ's Office of Professional Responsibility, stating that if Swartz didn't plead guilty, Heymann "threatened that he would seek for Mr. Swartz to serve seven years in prison," a difference in duration Peters asserts went "far beyond" the disparity encouraged by the plea-bargain portion of the Federal Sentencing Guidelines.[32]
Andy Good, Swartz's initial lawyer, told The Boston Globe: "I told Heymann the kid was a suicide risk. His reaction was a standard reaction in that office, not unique to Steve. He said, 'Fine, we'll lock him up.' I'm not saying they made Aaron kill himself. Aaron might have done this anyway. I'm saying they were aware of the risk, and they were heedless."[48]
Marty Weinberg, who took the case over from Good, said he nearly negotiated a plea bargain in which Swartz would not serve any time. "JSTOR signed off on it," he said, "but MIT would not."[48]
I don't know where you're getting this idea that people can agree to a plea deal and then the prosecution can request harsh penalties anyway. Well, I mean they can, but no one would, because the judge would yell at them and then ignore the request. That's just not how it works.
Edit: Actually, I don't even see how the prosecution in this case could have managed to try to sneak their way into getting the judge to feel like sentencing the Swartz to more than the deal, as they did with Donald Gonczy. The terms of the plea agreement specifically said that the judge could only impose up to six months.