I usually don't get attacked on sight unless my bounty is over several hundred. Bounties of 40 from assault will just make the guards initiate the "Hey, I know you." dialogue.
Perhaps your bounty is in Markarth? There's a glitch where guards remain hostile after a certain quest.
No, it is in any city. Even Whiterun.
Worst thing is: If I get a 40 bounty, they initiate dialogue. Only IMPERIAL OFFICERS ask me "I know you" when I have 1gp bounty.
All the other guards kill me on sight. Honestly, I can't understand that. Sometimes I kill rabbits near cities and get 1gb bounty. Sometimes I don't kill either steal and get 1gp bounty.
The next guard attacking me for my bounty, I'll put "setCrimeGold 999999999" on him. And then I want to see who's the daddy!