Like if we program our AI overlords to minimise unavoidable deaths, and it learns the best way to do in the long term is to sterilise everyone and wipe out the human race!
Well, sure, 7 billion quick deaths means less death and suffering than even a measly one gruesome random accident per year for 8 billion years in the future.
Reminds me of this article, about how a single reward could potentially destroy humanity. It's just a thought experiment though.