This is another example of the inconsistency of the characters. You never know who will be empathetic and who will say the other lacks sensitivity. You could say that it shows that neither is black or white, but that's not it. You can have different views on different issues, but when your views on the same type of situations change from week to week, that's a script problem, not a sign of shades of gray.
Booth always tells Brennan not to tell people too much about how their loved one died and she always wants to beat someone up or to look at the bone and not the person, yet she's the one to tell him to treat the homeless man with respect. I guess because she has looked at tribes across the world and knows what hierarchy means and treating the head guy with respect will gain compliance from everyone.
Once Booth knows that the guy was in the military he treats him better, but Booth should be the first one to know that many vets are homeless people and suffer from mental disorders as a result of their combat. He shouldn't have assumed that the guy wasn't worthy of his respect because he lived in a cardboard box in the first place.
The guy says he shot a pregnant woman and Booth seems to know what he's going through and Brennan says, "What you shot a pregnant woman." He tells her if she really wants to know what he did he'll tell her and the statement is almost a threat or a challenge, at least. She silently indicates she doesn't want to know and he says good decision. To me that's confusing because he was in the army and she's been in war torn countries. She knows the kinds of things that happen. She knows he's been tortured. Why is it so hard for her to hear what he's done. It would help her to know him better and he might want to talk anyway. I don't know why it's made to be a shocking thing or maybe something that would change her view of him. She said that war was sanctioned torture or violence anyway, done to protect the country. So, why act like it's something that would be too horrible to hear, especially when you think of their job and the absolutely horrific things they see on a daily basis.
Brennan tells him to be brothers in arm with the homeless man, to get information from him and Booth says that's insulting. Yet, I'm not sure if he's not doing that every thing when he tells the guy to wait for him outside the perimeter (the place where the treasure is where the homeless man is afraid to cross) and to get his back and the man says that he never left any of his men. So, did Booth just make it seem like he was a military comrade to make the man feel important (and not leave the scene) kind of like the way he does with Zach. He was playing upon their common background. Why? To patronize the guy or because he really likes him now and feels a kinship? Well, I think he does relate to him and the actor was god when he described what he did in the war, but I do think he was also kind of talking down to him when he told him to watch his back. I almost wish the guy had had an opportunity to save him, to put them on equal footing, rather than them just looking down on his homeless plight, which is what they all literally do in the end when they watch the man going home to his underground place, being welcomed to the other homeless who look up to him as a leader. They do indeed respect the guy, but it is a little condescending, but not as bad as the Bold and the Beautiful's homeless storyline by any stretch.