.
i think I'm stupid, but an ally is for countries and friend is for people?
An ally will probably only remain as long as the allegiance serves a purpose.
In my view, a friend remains a friend even when there is no purpose. You simply like each other and like hanging out together.
an ally is a temporary friend, you're sharing the same interest, but when it's not longer necessary, you can become enemies.
An ally, IMHO, is less likely to betray you.