Remember when McCoy was freaking Kirk out while hiding in the shadows of Spock's quarters. "Why did you leave me?" "Climb the steps of Mount Selaya." Apparently Spock thought that McCoy would be able to tell Kirk what to do. Something went wrong and in the absence of a written will, Kirk decided for burial in space.
McCoy doesn't start showing effects of the meld until quite some time after Spock's burial. Saavik and David have already left the ship and have a new posting on the Grissom, Carol Marcus is gone, the Enterprise is heading to Earth... and then McCoy goes loopy.