Why did developing nations often align themselves with one or the other super power?

For protection from the other superpower and neighbors aligned with it.