How is it thought that phosphine is synthesized by living organisms on Earth?
The background to phosphine production on Earth can be found in a review entitled “Natural Products Containing ‘Rare’ Organophosphorus Functional Groups” by Petkowski et al. in Molecules  24, 866 (2019). The four authors are also co-authors of the Nature Astronomy paper. They state (my emphasis):

The detailed biosynthetic pathway for microbial phosphine production
is currently unknown. For detailed discussion of the biological
production in the environment, its biochemistry, and atmospheric
chemistry see three recent papers by Bains, Sousa-Silva and colleagues
[482,494,495].

These three papers are from the authors, one of which I followed up:

Bains,W.; Petkowski,J.J.; Sousa-Silva,C.; Seager,S. New environmental model for thermodynamic ecology of biological phosphine production. Sci. Total Environ. 2019, 658, 521–536.

The abstract to this includes (my emphasis):

In this paper we show through thermodynamic calculations that, in
specific environments, the combined action of phosphate reducing and
phosphite disproportionating bacteria can produce phosphine.
Phosphate-reducing bacteria can capture energy from the reduction of
phosphate to phosphite through coupling phosphate reduction to NADH
oxidation. Our hypothesis describes how the phosphate chemistry in an
environmental niche is coupled to phosphite generation in ground
water, which in turn is coupled to the phosphine production in water
and atmosphere, driven by a specific microbial ecology.

The paper itself is not of the ‘author-pays’ type, so you may need institutional access to read it. There is a graphical summary provided, however, which summarizes the hypothesis:

The paper consists of detailed thermodynamic arguments for the scheme suggested at the particular temperature, pH and anaerobic environment of marshes and swamps. Under these conditions, the authors postulate that the purpose of posphine production is to gain energy†. The analogy would be with the production of NADH as in anaerobic glycolysis to gain energy, but needing to be reoxidized to NAD+ to allow this to continue. The reduction of phosphate to do this would be analogous to the reduction of pyruvate to lactate or to ethanol. Like ethanol, phosphine would be a by-product of no value to the organism.
However the possible role envisaged for phosphine production in Venusian clouds is different. In the Supplementary Information for the Nature Astrobiology paper, there is the following:

Initial modelling based on terrestrial biochemistry suggests that biochemical reduction of phosphate to phosphine is thermodynamically feasible under Venus cloud conditions. Biological phosphine production on Venus is likely to be energy requiring. However, life can make substantial energy investment into compounds that provide important biological functionality. There are many potential useful biological functions including signaling, defense, or metal capture for which phosphine has useful properties, so endergonic biosynthesis cannot be ruled out.

The suggestion here is that phosphine is a useful product, synthesized at an energetic cost.
The only biochemical connection between the two would be that if, as appears likely, life on Earth can produce phosphine (by biochemical pathways that remain to be discovered), then these same biochemical processes would be candidates for phosphine production by life on Venus if the authors are correct in arguing that (at least known) non-biological candidates have been excluded. The question does not ask for opinions on the latter, nor would I presume to present those that I hold.

† The thermodynamic approach involves calculation of Gibbs Free Energy changes (ΔG) for reactions. Often on this site discussing standard biochemistry we (or at least I) talk in terms of standard free energies — ΔG˚ (or ΔG˚′ for normal cellular conditions). However the actual value of ΔG for a reaction is influenced by temperature and the concentration of reactants (which will include hydrogen ions), so that the ΔG calculated for terrestrial marshes and the like is likely to differ from that in Venusian clouds.