Actually, here's what happened.
Throughout Arthur C. Clarke's original novel there are references to Cold War tensions on Earth while space exploration is going on. At the end of the book, The Astronaut (Dave) is taken through the thing that's "full of stars." He visits the head-shop, the light-show and takes the trip. When he comes out the other side, the beings responsible for giving certain chimpoids a quantum leap to become human, the monolith on the moon, and the thing that's "full of stars," have transformed Dave into a semi-omnipotent being just in time to save the world from a nuclear holocaust, which has just begun. With a wave of his now super-powerful embryonic hands, Dave The Star Child neutralizes all the nuclear weapons.
The ending of the film was ruined by Kubrick. He was already famous for Dr. Strangelove, and did not want the ending to be another nuclear war. So ... he simply bailed, and decided to and make it completely incomprehensible, rather than have the Star Child save us from the nuclear holocaust which ties the whole thing together. That's why the ending sucks.
And you're right: it does suck.
... which includes the text of THE SENTINEL (1950)
The film was NOT based on the novel. The novel was written during the making of the film and after the script was finished.