People unite facing the common enemy
When someone is taking out the gun, starts shooting at you and everyone around you, there is only one thing you can do to survive. Unite with everyone around you. It happens in seconds. It's survival instinct.
It may sound pretty obvious. But how about bringing that knowledge to a wider angle. How else could people unite? When getting married? Joining for a business? Meeting with friends?
What's the goal of those alliances? Be together? Have fun? Make kids? Build families and companies?
What's the difference between those reasons to join and when joinings against the common enemy?
Time and certainty. It may take a lot of time and can end before the goals are reached.
In case of survival, it either life or death. It doesn't take any additional time and it will not end until your common enemy is trying to kill you.
It becomes a question of life and death. It doesn't require special training or motivation. It only requires you being in such a situation.
Does it mean that all the other alliances are doomed to fail? Let's focus on the concrete reasons. If you are trying to survive there are options when you can join forces and when you are hiding behind the backs of others. But how efficient is that after everyone else falls? At any case, you stay focused on your goals to survive and take out your enemy until you achieve them.
So you might have 2 options of activity but you aim at the same goal. In case of other activities like uniting to create the business or a family, you might have many different goals. The more of those are different from each other, the weaker your alliance will be.
The most efficient strategy is to have absolutely same goals with everyone you unite with. That's why a squad of marines can easily destroy a team of people who united to survive.
Having the same goals creates the strongest kind of unity.
This could be implemented in any venture in life. Wherever you find yourself. Wherever you need to unite with someone.
Any purpose might be achievable if you get enough people to believe in the same goals. And not just "believe," but make it a question of survival. Anything would be possible.