Having military bases is very different than a country being an ally.
Countries like Egypt are very shaky politically and the others are not even democracies.