On what are you basing this assumption about the capabilities of an autonomous car? You’re fortunate that the other driver was paying attention, most human drivers stopped in traffic wouldn’t be looking behind them. An autonomous car is looking in every direction all the time; it would see an oncoming vehicle, detect an impending crash, evaluate hundred of possible actions to take, informed by data that a human driver couldn’t hope for, and make a decision about the best course of action.
Your story is anecdotal. You and the other driver were lucky. The much more common outcome is that a human driver who noticed you coming up behind him either would have frozen in panic, or taken panicked action without full awareness of what else was going on (they were lucky there wasn’t another car coming up in the other lane that they didn’t see).