I've written about this in another post but I'll quickly mention it again here - with chelating metal ions it matters what the structure of the chelating agent is and what metal ion you are trying to remove with it. It's a very complicated mix of structure and chemistry.
Citric acid (CA) is a tricarboxylic acid with a bent/linear structure that will fully deprotonate giving up three hydrogen ions. In comparison, ascorbic acid is a furan molecule (a ring structure related to glucose) with two -OH radical groups that will deprotonate fully in water giving up 2 hydrogen atoms. So, on a simple molar basis, citric acid is more acidic than ascorbic acid. But that actually isn't all that relevant.
Ascorbic acid is also a powerful reducing agent whereas citric acid is not as strongly reducing. SO in terms of iron chemistry (which is where most pool stains come in), ascorbic acid is very good at reducing the oxidation state of iron -
Fe3+ (rust) + e- --> Fe2+ (highly soluble)
So not only does ascorbic acid locally reduce the pH which is good for dissolving metals, it also converts most iron from its insoluble rust form to a highly soluble 2+ oxidation state. Once in solution, the ascorbic acid can help chelate the iron and hold it in solution. The only problem is when you add chlorine back into the water, the ascorbate molecule that chelates the iron gets oxidized into the dehydroxyascorbic acid form which has no chelation effect (this is why chlorine and AA neutralize one another).
There is also another downside to citric acid. One might be tempted to think that because it is more acidic, that it would work better. But that is not how it works. When citric acid loses all of it's protons to solution, it has three negatively charged sites that can chelate a positively charged metal ion. But, what tends to happen is the complex that forms between the metal ion and the citric acid molecule involves multiple numbers of citrate molecules making the ring structure crowded and less stable. Citric acid actually works better at lower pH to chelate because it release fewer protons and thus will form a smaller, more stable complex. That would normally occur when the solution has a pH below 6, but, in a pool, having a pH that low can be dangerous to equipment and surfaces. So, in the end, Citric acid is less desirable to use as a metal stain remover even though it is cheaper.