In both scenes, both officers are obviously too far from the enemy to use their swords. Why didn't they use the other hand to shoot the revolver with both hands?
An officer's primary responsibility is the command and control of his men, not combat with the enemy. In consequence, an officer is issued with a weapon of little use in combat at a distance: a pistol. This is deliberate, to help an officer not get so distracted by combat that he neglects the more important responsibility of directing his men.
In Infantry Attacks, in his observations following the Battle of Defuy Wood, Rommel remarks (my emphasis) pp 34:
The hard soil of the 2nd Battalion sector made digging difficult. It required all command powers, as well as personal example on the part of unit commanders, to force the tired and hungry men to dig their utmost during the night of September 7-8.
By "all command powers" I believe Rommel himself (or possibly a direct subordinate) physically threatened a particularly recalcitrant soldier: "Keep digging, or I shoot you right here for mutiny".
If an officer ever has to resort to this final command measure, morale will either plummet or soar. As Rommel notes in the preceding two paragraphs:
.... The 3rd Battalion paid dearly for having established itself close to the southern edge of the wood. In this position it suffered extremely heavy casualties, [due to artillery fire going off in the tree branches above them] and had to be withdrawn during the night of the 8th. ....
In contrast to this, the 2nd Battalion's pick and shovel work on the barren hill paid large dividends. In spite of an artillery bombardment lasting for hours, our casualties were very small.
When an officer's forceful orders and personal example result in his unit sustaining very light casualties, while the neighbouring unit fails to take the same measures and is in consequence destroyed as a viable fighting formation, the men are appreciative.
From my comment below
As for what pose would an officer of the time use in aiming and shooting a pistil:
Officers were gentlemen, and until the mid 19th century subject to potentially fatal dueling. In dueling one must present the smallest target possible to the opponent, and so one-handed shooting is preferred, sideways from the shoulder. This particular pose is likely the only one in which an officer would practice, because it was the only time he would fire the weapon at a range further than a few feet.
When did using both hands to shoot one pistol for better accuracy start?
The "Modern Technique" of two handed pistol shooting is said to have been first(?) used by Jack Weaver about 1956 and taught by Jeff Cooper.
Therefore almost all 19th century pistol shooters had to have used one hand to shoot a pistol - otherwise the Modern Technique would have been far older.
For example, Wild Bill Hickok (1837-1876) is said to have practiced shooting a lot, unlike most western gunslingers. If Hickok thought of and tried two handed pistol shooting and liked it, it would have become well known and could easily have led to two handed pistol shooting becoming the usual method.
I can easily imagine that a number of women and children, barely strong enough to lift a heavy pistol and not having derringers available, might have tried holding pistols in two hands. But if men saw them do that they might have considered it a technique for women and children, not for men.
But I can't imagine that two handed pistol shooting was used a lot in the 19th century, because otherwise its advantages would have been noticed and it would have become a common technique in the 19th century.
So those movie scenes are accurate, at least in showing officers not using both hands to shoot pistols. When 19th century officers fired pistols they would have done so with one hand.
The pose has your entire chest and stomach are exposed to the enemy. This displays your lack of fear, useful for a person who has to lead by example. People who might be faltering due to their own fear are more likely to rally behind you. If they're feeling panicked and unsure what to do but you seem completely in control of your faculties, they'll instinctively defer their decisions to you.
In this time period, the sword is a good reminder to those around you that you're an officer. So you have to be holding it while controlling your subordinates either way. The pistol is just part of the act, you're just as terrified as everybody else but aren't showing it.