Both kinds of grip optimize hitting with the point of the sword (a 'thrust'), which is the only way to score a touch with a foil or épée.
This gives the fencer a longer reach while reducing the power of beats and parries, and allows for an expanded repertoire of counterattacks and remises of attacks.
[1] A substantial number of épéeists at all levels use French grips while posting to allow for longer reach.
[1] In competitive fencing pistol grips are nearly universally preferred in foil, and are used by a large percentage of épée fencers because they allow stronger blade movements.
These grips provide better control and leverage, which enables fencers to execute precise and powerful actions with their weapons.
The ergonomic design of pistol grips reduces hand fatigue, allowing fencers to maintain a firm and stable hold during prolonged bouts, which is crucial for high-level performance in fencing sports.