Sure, bugs and/or undefined behavior could happen for a variety of reasons. And that's precisely where we leave the relatively objective realm of computer programs and get into the murky waters of law. There's this thing called "intent" - "did the programmer mean to defraud the bank (and possibly enrich himself), or was it an unfortunate coding error?" - and it's notoriously tricky to prove or disprove, as you can't just attach a debugger to the programmer and take a peek ;)
So: making errors, per se, is mostly not a crime (but you may want to get a good lawyer anyway - criminal negligence and all that); writing deliberately faulty code is quite another thing - even though the result may be indistinguishable. To use a bad analogy, the end result "stabbing Joe in the chest" might be reached by being extremely clumsy with your steak as well as by having a knife-fight.
That said, following the money is usually a good rule-of-thumb: if (as the story goes) the pennies rounded off third parties' transactions were deposited into an unrelated account, that alone might have sufficed to establish mens rea.
(This specific story is in circulation since the beginning of electronic transactions in the banks - i.e., since 1960s - and it may be an urban legend FWIW; but that's hardly the point. Also, IANAL.)
So: making errors, per se, is mostly not a crime (but you may want to get a good lawyer anyway - criminal negligence and all that); writing deliberately faulty code is quite another thing - even though the result may be indistinguishable. To use a bad analogy, the end result "stabbing Joe in the chest" might be reached by being extremely clumsy with your steak as well as by having a knife-fight.
That said, following the money is usually a good rule-of-thumb: if (as the story goes) the pennies rounded off third parties' transactions were deposited into an unrelated account, that alone might have sufficed to establish mens rea.
(This specific story is in circulation since the beginning of electronic transactions in the banks - i.e., since 1960s - and it may be an urban legend FWIW; but that's hardly the point. Also, IANAL.)