Each of those arcs had their own set of circumstances that dictated that they break up into small groups. Additionally, neither one had the Straw Hats actually fighting in the war (at Alabasta, their duels were done separately against Baroque Works, and only actually fought in that war at the very end). In short, pairing off to have a bunch of duels was how they were trying to stop the war. And breaking off into pairs was how they were supposed to be freeing Robin.
But here at Marineford, it is literally a battlefield. Its a war. And Luffy is actually directly fighting in it. Wars aren't fought in duels. The situation is completely different from both of your analogies.