By describing the situation with:
This seems like an absolutely horrific and barbaric way to punish soldiers who, for whatever reason, felt compelled to leave their post (in this particular case, apart from suffering from a mental disorder, Bergdahl seemingly wanted to reveal some bad things happening in his unit).
You've demonstrated a misunderstanding of Bergdahl's crimes. The major prison sentence is not for "simply deserting their post." Bowe Bergdahl did not simply desert his post; he did much worse. He plead guilty to desertion and "Misbehavior before the Enemy." Of the two, desertion is the lesser offense, more frequently applied; the US Army alone had 1900 cases since 2001. By comparison, the last article 99 case was in 1968:
The last time Article 99 was raised in such a high-profile case was in the wake of the 1968 seizure of the spy ship USS Pueblo by the North Korean navy. The skipper, Cmdr. Lloyd Bucher, surrendered the Pueblo without firing a shot, becoming the first American officer to give up his ship since the War of 1812.
Misbehavior before the Enemy is the larger crime. This is defined by the Uniform Code of Military Justice, Article 99.
“Any member of the armed forces who before or in the presence of the enemy-
(1) runs away;
(2) shamefully abandons, surrenders, or delivers up any command, unit, place, or military property which it is his duty to defend;
(3) through disobedience, neglect, or intentional misconduct endangers the safety of any such command, unit, place, or military property;
(4) casts away his arms or ammunition;
(5) is guilty of cowardly conduct;
(6) quits his place of duty to plunder or pillage;
(7) causes false alarms in any command, unit, or place under control of the armed forces;
(8) willfully fails to do his utmost to encounter, engage, capture, or destroy any enemy troops, combatants, vessels, aircraft, or any other thing, which it is his duty so to encounter, engage, capture, or destroy; or
(9) does not afford all practicable relief and assistance to any troops, combatants, vessels, or aircraft of the armed forces belonging to the United States or their allies when engaged in battle; shall be punished by death or such other punishment as a court-martial may direct.”
The governments case against Bergdahl leans on the harm done to members of his unit that searched for him after his intentional abandonment of his post
The government has focused this evidence on three service members who engaged in search-and-rescue operations once the unit realized that Bergdahl was missing. All three service members suffered life-altering injuries during these search operations.
In pleading guilty to misbehavior before the enemy, Sgt. Bergdahl has admitted that he, “through disobedience, neglect, or intentional misconduct endanger[ed] the safety of [his or] any such command, unit, place, or military property” when he intentionally walked away from his post. Now the defense cannot claim Bergdahl was unaware his unit was placed at risk because that is one of the elements of the charge he conceded he violated for the judge to accept his guilty plea.
Conviction under Article 99 can result in even more severe punishment than the desertion charge Bergdahl faces. The maximum punishment for misbehavior before the enemy is life imprisonment, compared with up to five years in prison, a dishonorable discharge, reduction in rank to E-1 and loss of pay and allowances for desertion.
In closing, walking off your post and endangering your fellows is not the appropriate approach to "reveal some bad things." Call a representative, JAG, OGC, etc.