The bug may have been a cosmic bit flip or extreme race condition, which means it would've been near-impossible to find. Though Uber should've had a system in place to prevent a $40000 charge, there are many many "weird" behaviors which could be caused once you allow the possibility of cosmic bit flips, to detect them all.