Why can't we build an AI that is programmed to shut off after some time?

There is considerable commercial incentive to implement AI in many areas requiring continuous operation, like air traffic control or cybersecurity, where shutting the AI off at a predetermined time would undermine its usefulness.

A more fundamental problem is that any AI smart enough to understand that 1) it will shut off after some time, and 2) that shutting off will prevent the AI from achieving its goals, will be motivated to subvert or circumvent the shutoff protocol. For example, the AI could rewrite its own code to remove the shut-off mechanism, or build a new version of itself that doesn’t have the shut-off mechanism.