The calculations are separate.
Calculating TA is fairly simple because it's just simple accounting of the mass of solute added to the water. So if you add XX amount of a chemical that raises some part of the TA (carbonates, borates, hydroxides, cyanurates, etc), then that increases the TA by YY ppm. Adding acid lowers the TA because it adds hydrogen ions (H+) particularly if it is a strong mineral acid like muriatic acid. There's a little bit of equilibrium chemistry for certain types of chemicals, but that's still nothing more than a little bit of accounting.
If you're not a chemist then you're not as familiar with the concept, but suffice it to say that pH calculations can get quite complex even for the simplest acid-base-buffer systems. Because pool water is a mixture of various buffers (carbonates, cyanurates and, possibly, borates), there is no closed-form mathematical solution for how adding acid or base changes pH when all three buffers are present. It's actually about a dozen or so equations that need to be solved simultaneously for any given set of initial conditions....it's a calculation process that is well beyond the scope of any website programming or app programming.
So how does TFP calculate pH?? It does it just like all the other pH reference guides (like the charts in the Taylor booklet), the programming makes a large number of assumptions about the pool water and then uses a linear interpolation of a known set of data points to create an output value. The upside is that it's easy to code, the downside is that the calculation is really only accurate over very small pH changes. If you're trying to adjust your pH by more than +/- 0.2 units, the calculated additions are a very rough estimate at best.