A computer program does exactly what the instructions tell it to do. Problem is, the designers dont foresee what the outcome will be. The program will continue to produce stupid output until it is stopped, and fixed.
No computer program is equivalent to the human mind. The human mind is self-correcting and able to come to its senses and avoid really wrong output. Sometimes the self-correction fails that is called insanity.
“A computer program does exactly what the instructions tell it to do.”