He pled guilty and went to jail to avoid a longer sentence from another crime to which he was also innocent?
Your incredulity is warranted. Federal sentencing doesn’t work like that. That’s more of a state court thing.
The federal judiciary has final say over the sentence after a guilty plea. The prosecutor’s recommendations carry weight, but are not final (see Roger Stone).
If you plead guilty to something in federal court, you have some idea but don’t know exactly what you’re going to get sentenced to. Your range of outcomes tends to get worse when you plead to multiple somethings.
In federal court, one of the major incentives to plead guilty is because the sentencing guidelines place a heavy emphasis on contrition. Someone who denies culpability to the point of going to trial and then loses will be punished far more harshly than someone who pleads guilty. (See Paul Manafort).
In short, any competent federal defense lawyer would negotiate for an unprovable charge be dismissed in exchange for whatever they can leverage. (See e.g. Mike Flynn whose contemporaneous charges with higher exposure were all dismissed to get the range of outcomes to a reasonable level.)
There may be some federal criminal context where pleading to multiple charges gets you a guaranteed better deal on some of the charges, but I’m not aware of it. Maybe there’s some multi-crime procedural snare that made it impossible, but that’s not apparent, either. Maybe Cohen had some other serious charges dismissed or that weren’t pursued. Maybe the take that this was a flimsy charge is just wrong.