You're looking at it the wrong way. I killed like 15 guards before I had to surrender. Take on as many as you can and then sheathe your weapon when you can't take any more.
It's really a cool part of the game because you can kill as many guards as you want without worrying about a bounty.
I just surrendered immediately, kind of impressed that a quest was taking me in an unexpected direction instead of asking me to simply murder a bunch more people without thinking....
I dunno, I just didn't surrender. I fought my way out of Markarth instead, and haven't returned. That's how I "finished" the quest.
All of these. They didn't force you to surrender. You could've fought your way out of the city, and that would have resulted in not really finishing the quest as intended, but that's still an ending to it. You also could have stayed and fought until finally succumbing to the pressure. And getting arrested takes in a very unique path and offers a way better story and a more interesting experience.
How dare you not allow your character to be three dimensional and actually have to suffer a minor loss every once and a while. Shame on you.