“Hal is a machine. Hal is programmed (or misprogrammed) to block the mission, to destroy it, to destroy Bowman, who as it turns out, is on a voyage to greater consciousness.”
No, Hal wasn’t programmed to sabotage the mission. He was programmed to ensure the completion of the mission, at any cost. In fact, he was the only one on the ship that knew all the details of the mission, because the flight crew was not trusted with the most classified information. He decided, based on his logic and programming, that the humans must be unreliable and a threat to the completion of the mission. So, he did what seemed to him to be the logical thing and tried to eliminate the threat.
And therein lies the problem with AI.
"Since HAL was capable of operating Discovery without human assistance, it was decided that he should be programmed to complete the mission autonomously in the event the crew was incapacitated or killed.
He was given full knowledge of the true objective... and instructed not to reveal anything to Bowman or Poole. He was instructed to lie.
HAL was told to lie - by people who find it easy to lie. HAL doesn't know how, so he couldn't function. He became paranoid."