The 5 year limitation is in the law that he was found guilty of.  If he had been found guilty of the Felony which the DA dropped, it could have been 15 years.  

The judge can't enter an unlawful sentence.  When they cut the deal for a Misdemeanor instead of a Felony this was one of the results.  The other is that he can't serve a total time in jail even if he violates probation of more than one year and even then would  have to get credit for the 17 days he has already served.

Was he actually guilty of the Felony?  We will never know.  Could he have been found guilty of the Felony?  Depends on who was on the jury.  Would he have received a greater sentence if he had been found guilty of the Felony?  We will never know.  

I believe that Oregon is running in the 90%+ range for plea agreements instead of trials and has for years.  The DA's say that's all the taxpayers are willing to pay for; if we want more trials, we need to hire more DA's.