Perhaps Islams attraction for Ali was that at the time, this religion served his purposes. Islam was the chosen faith of Malcolm X, who was sort of the Anti-MLK and advocated violence, was done ‘waiting for peace’. Islam also served to keep Ali from having to serve in Vietnam, providing a conscientious objection to war. Apparently, there were very few black Quakers in his area back then.
Malcolm X was also very anti-liberal. He knew their policies would be disastrous for black people. Which probably explains why Ali supported Reagan.