Which was for WHAAAAAAAAAAT?
When he returned from France, he was confronted with his actions by the navy. Now, the U.S. Constitution specifies that to prove treason, either the testimony of at least two eyewitnesses is required or else a confession in open court. The navy knew that they could not prove it in court, but they knew he did it. So they booted him out with an Undesirable Discharge. Along with the discharge they may have stripped him of all his medals.
That explains why he got TWO upgrades to his discharge and why his medals were re-issued once the discharge was upgraded to honorable.
It should be noted that he did not get a bad conduct discharge or a dishonorable discharge as these are imposed only by sentence of a special or general court-martial and the record of such a thing is extremely difficult to cover up.