He could have just been playing for time. Don't forget that he was outnumbered five to one and at least two of his foes had potent attacks. While he knew Hidan had been tricked into destroying one of his hearts, I expect he still thought Hidan could/would destroy Shikamaru and return to help even the odds up.