I can't believe that Michael finding out (trying to find out) who was the traitor was worth risking his life?
Perhaps he thought that
not finding out who was the traitor in his family was more of an immediate risk. As he told Tom before he left, "This is life and death." He also was trying to keep Roth "relaxed, sure of our relationship." If he'd abruptly cancelled the visit to Cuba, he would have signaled that he knew Roth was the Tahoe culprit, giving Roth a chance to escape, or to strike again.
(Anyway, the real purpose was to set up that splendid Havana scene--one of the best in the Trilogy--as well as Fredo's exposure as the traitor.)