sometimes autoplay will roll high enough to kill the enemy and just... reroll? I have no idea why
The AI doesn't consider that, it always rerolls if damage is less than 50% of max. Maybe it should. But it's also fine for it to not be "perfect" as that leaves more room for not using it.