I took it that the Hulk is somewhat simple minded and just needed to be pointed in the right direction. If you go back to the TV show, he wasn't without heart or compassion. When there's an invasion, Cap points him at the bad guys and he goes to town, but he still saves that punch for Thor, so he's not all Super Hero exactly. You also have to think that the Hulk learns and has memmories just like Banner does. Maybe he starts figuring out what side to be on after the Hellicarier battle.