So, I'm wandering through Rorikstead one day, when three Stormcloak soldiers charge up the road into town and start battling it out with the Whiterun guards protecting the hamlet. The Whiterun guards had been chatting me up just before that, friendly as you please.
On a whim, I decide to help the Whiterun guards kill the Stormcloaks. I'm using my bow, and carefully plucking a shot in here and there to just hit the Stormcloak guys. Before long, the Stormcloaks are all dead. Immediately, the Whiterun guards go hostile on me and all attack me. Thanks, guys.
I assume i must have accidentally hit one of the Whiterun guys during the fight, which was the only thing I could think of that may have made them hostile. So, i reload a save and redo the fight again, being very careful never to hit the Whiterun guards, and only getting a hit or three in on the Stormcloaks during the fight. Again, the Whiteruns win, and again, they immediately hostile me and try to kill me afterwards. I did notice that as soon as the last Stormcload died, a message came up saying 'Whiterun bounty on you for 40g', or something like that, which I guess explains why they attacked me.
But it doesn't explain how I had done anything that should have put a bounty on me in the first place, as all I did was assist the Whiterun guards to kill their sworn enemies. Is the game truly dumb enough to brand me a murderer and eligible for a Whiterun bounty, just for helping the guards do their job? I should have gotten a reward, not vilified. Go figger.