Well, he could hold out hope that Kirk was still alive, he never actually saw him die.
And though they mention they were going to do away with the Enterprise-A at the end of VI, the crew goes galavanting off so we never actually know if that ever really happened.
So in truth, knowing the lengths Kirk went through to save Spock, and the situation he was in, and perhaps for how long, it probably shouldn't be surprising if Scotty thought that was the only one who not only would come to save him, but actually was there to save him.