Consider a loop in a uniform magnetic field. In fact, consider two. Which of the loops is in a stable equilibrium position as far as rotation is concerned?
One way to answer this is to replace each loop by its equivalent bar magnet, and think about where the north and south poles are of the magnet responsible for the uniform field. That should make it easier to see that loop 1 is stable, and loop 2 is in an unstable equilibrium position.