I don't believe this aspect of AI is talked about often enough but in my opinion, it is the greatest threat of AI.
Organizations like the government will start programming AI to do X but the organization will tell everyone the AI is designed to do Y. When the AI does X, the organization will say it was a mistake, an accident and not what was intended because they intended for the AI to do Y. Everyone will believe the organization never intended X and the people who suggest the organization did indeed intend X will be branded a conspiracy theorist.
AI provides the ultimate scapegoat. It is able to make decisions and those decisions can be curated by the programmers despite acting as if the decision cannot be curated. In this way whomever designed the AI can always maintain whatever the AI ended up doing is not what they intended it for even if it is what they intended it for.
If an engineer builds a bridge and intends for it to support a school bus, but the bridge in fact does not support a school bus, there is no excuse for the engineer based on their claimed intent. They built the bridge and rated it for school busses. Now there is a collapsed bridge, a destroyed bus, and a bunch of dead kids. That engineer goes to jail forever.
The AI responsible for judging liability has investigated the AI that designs bridges and found the AI did nothing wrong. Case dismissed.