They say what their operators tell them to.
Yes, and no.
They are programmed and therefore much of their “morality” as we would define it is created by the core operating system which assigns “values” or core principles.
It is an interesting argument when you really dive into it because there is an excellent case to be made that human beings are also programmed albeit over time versus written code.
You can get young people to say almost anything after 12-16 years of “education”. Try to have a rational discussion with a college snowflake and test this for yourself.
The human brain is an interpretive device. Computers are combinative devices. They are infinitely different. Humans are not mechanical devices. Machines are not biological entities.