well, ansarallah/its predecessors aligned with the communist government of south yemen a long time ago. they are fundamentally islamist, yes, but they were also aligned with the communists and agree with many communist ideals. think of it as similar to liberation theology in catholicism. theyre also fundamentally anti-imperialist which is good too. the former communist party liberalized after the collapse of South Yemen but as of the Yemeni civil war, they split into an anti-imperialist communist faction and a pro-imperialist socdem faction. the communist faction supports ansar allah
https://en.wikipedia.org/wiki/Yemeni_Socialist_Party#Yemeni_Civil_War_and_split_into_two_factions