Although the "Shell Shock" episodes are hints in this general direction, it really isn't until Billy's confrontation with Beattie in prison that the novel really reveals its true themes. For one thing, the encounter has mythic overtones, because he is descending into some kind of underworld to find a hidden truth, and what he finds instead is a woman who points out his character flaws and re-educates him on his role in the government. Now, in light of this "anima-type" confrontation, Billy is fully locked into the novel's thematic crisis.
Why did he automatically trust his own government? When he goes to war, he trusts his commanders until there is reason to be suspicious, and then he goes through a bunch of mental hoops trying to give them the benefit of the doubt. He knows there has been some unsavory activity in the government, but it isn't until Beattie explains what they did to her that he realizes what was so evil that Beattie and company were arrested. It was because they changed their mind about the war.
Well, for Billy, that is a gripping issue, because after watching countless men die under his command, he hasn't been feeling the warm-and-fuzzies for the war in a long time. The issue of deserting one's post is a thematic issue. It's obviously treason, but as Billy considers the uncomfortable position the army has put him in by making him an undercover spy against his own people, he realizes that treason, betraying the government, in some cases might be exactly the right idea.