A few thoughts.
First, one possible solution is pre-roll initiative. When everyone sits down to start the game, roll initiative. When an encounter takes place, the DM has everyone's initiative all set, but you don't use it until an appropriate situation arises.
This is only vaguely relevant to this situation, but it does seem to help speed up combat at times. See below for where I would use this.
Second, the guards, and the PC should not be surprised in this situation. But, that does not mean they cannot be flatfooted. So, how does that work when the assassin goes last and is the one initiating an attack (or any situation where the attacker is lower than the defenders in init order)? I have always determined it to be watching the attacker initiate the attack, but the highest init folks are able to respond quickly. Everyone sees that the situation just escalated, but some people are just quicker responding than others. Maybe even quicker than the person initiating aggression.
An aside:
It could be argued that this should be Bluff/Sense Motive. I disagree because that is not suitable for initiative. However, if the Assassin in this example wanted to try for a surprise attack, I might allow a Bluff/Sense Motive check. In this case, the assassin wants to attack, but is hiding any of the body language that would normally clue somebody into their hostile intent. But, that is a house-rule and could easily give too much power to Bluff in your game. YMMV.
Back to my point:
Using this rationale allows me to envision situations where everyone is tense and ready for the encounter to escalate. In the case of town guards, maybe they have the crossbows ready, but not pointed directly at the assassin. He starts to move in a hostile fashion, but not quick enough (low init), all the guards notice the aggression and raise their corssbows. Now, they can either attack because he was "going for his dagger" or they might delay. The assassin, seeing that he has 5 guards delaying on him decides to drop the dagger instead of sticking it in someone. If the assassin had won initiative, then he could have drawn a dagger and stuck it in Bob's eye before anyone else had time to raise their crossbows, but they aren't surprised.
How would I have run this encounter? I would have had each combatants init ready ahead of time. As soon as somebody escalated the situation, I would have dropped into combat time and resolved in combat order then. As soon as one person declares an attack action, then it moves into combat time and the initiator might not go first. For my games, this makes my players think a little more before acting. Just because they were the first ones to decide to attack doesn't mean they get to attack first. It has also resulted in spellcasters suddenly casting 'Comprehend Languages' that was misinterpreted as an offensive spell and dropping the group into a combat. (Sure, that might make me sound like a real bastard. But, let me ask you how a group of PC's without spellcraft would react if a group of armed mercenaries they meet on the road suddenly started waving his hands around and chanting? Would they assume he was attacking or would they assume he was doing something benign? It works both ways.)