What’s the purpose of the flap on the side pocket?
It’s there mainly to secure your important small gear, such as a cell phone. The rule-of-thumb is the item you want to stow won’t be too big for the pocket as long as the strap can close over that piece of gear.
A word of caution, though: the strap must be detached before you wash the pants.