Why did he only remain in prison for one year ? After commiting high treason and an armed revolution against the state ?
The Weimar Republic was not popular among the German Judiciary. Most judges in the Weimar Republic also used to be judges in the German Empire, and were highly conservative and sympathetic to right wing movements. Hitler was tried in Bavaria, and many judges in Bavaria viewed the Weimer Republic as a treasonous entity for overthrowing the German Empire, and didn't consider an uprising against Weimar to be treason at all.
The chief presiding judge at Hitlers' trial was Georg Neithardt, he regularly gave lenient sentences to far right revolutionaries and wasn't afraid to be known as being partisan. In fact before the trial he proclaimed that he would never imprison Erich Ludendorf, Hitlers' co-defendant. The other judges were also sympathetic to the Nazis, although not to the same extent as Neithardt. The judges even if they didn't support the coup sympathised with Hitlers' reasons for attempting the coup.
In addition to this the chief prosecutor for the case Ludwig Stenglein was somewhat incompetent, and was willing to let Hitler make speeches that lasted for hours.
The main reason that Hitler was even found guilty was because he didn't attempt to deny his actions, and because the Bavarian government didn't want the trial to be too extensive so that their dealings with the Nazi party before the coup didn't become common knowledge. So the Bavarian government influenced the judges to give Hitler a very light sentence so the trial would end quickly. Therefore Hitler received a sentence of 5 years, and would be eligible for parole after 9 months.
Otto Leybold the commander of Landberg prison where Hitler was imprisoned was also very sympathetic to Nazi ideals and allowed Hitler to send correspondence and receive visitors, even though this was technically against the prisons' rules. He also advocated for Hitler being released on parole after 9 months.
Sources:
Hitler and the Beer Hall Putsch by Harold Gordon
The Trial of Adolf Hitler by David King
The Adolf Hitler Trial before the People's Court in Munich Judgement (1923) by the Bavarian People's Court
I asked this question a couple years ago from a now-deleted account and got this excellent answer!