So if you KNOW why he's in jail,
Yea, he broke the rules. As an enlisted person, he/she doesn't have a "right" to do anything except eat, breathe, and follow the orders given.
The UCMJ covers a lot of ground and just breezing the top you can find enough to say that this he/she did wrong. (Not necessarily anything he/she was charged with but these alone would be enough to end up with an incarceration order.)
•� 888, Article 88. Contempt toward officials
•� 889, Article 89. Disrespect toward superior commissioned officer
•� 891, Article 91. Insubordinate conduct toward warrant officer, noncommissioned officer, or petty officer
•� 892, Article 92. Failure to obey a lawful order or regulation
•� 898, Article 98. Noncompliance with procedural rules
•� 908, Article 108. Military property of United States� Loss, damage, destruction, or wrongful disposition