I should hasten to add that STPP can function not only to prevent the deposition of hard water mineral precipitates on clothes and washer internals, but also to help break away and hold in suspension many of the same hard water minerals that are integral to soil on fabrics - you know, stuff like garden dirt. And perhaps also mineral based industrial or automotive grease. It does this better than any other single laundry additive.
However since the banning of phosphates in many products in many states and countries, the laundry detergent mfgs have devised various work arounds. IMHO, the early ones, which relied heavily on sodium carbonate, which can leave a mess when combined with hard water, didn't clean so good. It's my impression (not based on any insider knowledge) that mfgs like Persil and Tide have figured out how to get good results without phosphate. At least with their powders. I still don't think there's any liquids out there that can handle really filthy laundry as well as the top powders.
The replacments for phosphates include such oddities as zeolites (basically, aluminum silicates that capture some but not all hard water minerals in their nooks and crannies, or odd sounding organic chemicals like TAENF whatever that is. Zeolites do a good job with calcium ions but not so good with magnesium and other hard water minerals. And so on ad nauseum.
A while back I devised a home test for demonstrating part of the hard water mineral problem. In one jar I'd put some well water (we have soft muni tap water, but the well is for irrigation) and some standard laundry detergent. In another, some STPP. Shake them up, when the suds subside, you can actually see the flakes of precipitated out calcium and magnesium carbonate in the standard detergent jar, but the jar with STPP would remain crystal clear. And yes, the ppt looks like lint, but it's not so nice to have on finished laundry and it can put a layer of something akin to concrete inside the washer.