I didn't leave them. I left my own alliance to go join them. Had to go back for the war cause. I wasn't in it but I donate troops. Waited a few hours. Then went to go back to my friends alliance. No warning of any kind. No time indicated. Just no you can't do that.
I believe if your join request is rejected, you have a 24-hour cooldown period before you may request again. It sounds to me like that's what happened to you. The cooldown is in effect to prevent players who have already been rejected from continually spamming join requests.
So you left your alliance, went to your friends', left again, then wanted to join back? Of course you're getting the penalty. There's no way you could leave the same alliance and rejoin within 24 hours (or so, I forgot).
If you're kicked it's even more harsh, you can never go back in the same day (24 hours).
I think it’s to slow down the ability of just going back and forth between alliances just to be a ringer for war. I’m all for a long cool down. There was a time where people joined to drop spam about “Hey join my alliance because this one sucks” and than drop the microphone and leave.
It's not penalty, it's common sense. If you quit alliances for more than twice in 24 hours, you might be considered a spammer, so they give you time to cool down.