if the "machine" is programmed to make a certain "choice", and "obeys" that programming, why is it guilty?
The open question is why and how humans can "feel" guilt. How can a machine have a subjective experience at all? What is a subjective experience? This is the so-called "hard problem".