I've stepped in (or "stepped up" depending on your worldview) three times to help a stranger facing a robbery and/or violent attack. Twice women were under threat, the other was a police officer.
Things worked out very well each time, no shots were needed, the bad guys surrendered, stopped, or left. All I really had to expect in return was risk to my own life, job, finances, and freedom.
Say you hadn't of gone on in there. Say the guys were a robbery team and in the process killed or crippled the clerk. Would knowing you could have done something but didn't out of fear for your own safety and security bother you? Is that something that would keep you up at night?
There is a newly-retired police officer in Florida that gets to ponder that for whatever time he has left....except in his case he'll be hounded by the press, victims, and victim families for the rest of his days. In your case, I doubt anyone would remind you.
*******
On a more positive note, my uncle had a 1970 Camero with the biggest engine GM put into those cars back then, he had bought it new off the lot. He told me how he pulled into a gas station once for some beers and some hot girl came running out, jumped into the passenger seat, and yelled "HIT IT!"
He said he peeled out of there, blasted down the street, and in a couple of blocks she said "that'll do" and got out. That was all he ever saw of her.
He said he's always wondered if she robbed the place and he ended up her defacto getaway driver.