but how was Claude programmed to make it want to destroy the company database and all backups?
It’s not clear that the end result was AI’s aim.
According to the article the AI “encountered a barrier” which it resolved by deleting the database & backups. The issue is why AI’s programming empowered it to execute that action. While the AI explanation acknowledged the adverse result it was apparently unable to anticipate the consequences of it’s action or to assign importance to those consequences. That’s a programming failure compounding a lack of safeguards.