The explanation given is that HAL was given, in secret, orders not to reveal the true purpose of the mission to Poole and Bowman, the two crewmembers not in hibernation. Because even the designer[1] of HAL was not made aware of this secret instruction, they were not aware that HAL's fundamental design was incompatible with the concealment of information, and in attempting to obey the instruction, created what in humans would be called a mental health crisis.
[1]: "Dr. Langley" in 2001 the movie, but in the book and in all adaptations of the sequel, he has the wonderful name of "Dr. Sivasubramanian Chandrasegarampillai".