Total fluke. Apparently the byproduct of Madoff’s Ponzi scheme. I didn’t find the explanation in the article all that clear as to how/why but this seems more like luck than good negotiating.
Madoff's involvement is tangential, in the sense that investing in his scheme was the reason they opted for a deferred-payment scheme, but that's it. What is surprising is how long the contract is.
You're not giving Bonilla (and possibly his agent) enough credit. He has another deal like this one with the Orioles that pays him $500k a year.