I've even heard of a legal term called "statute of repose" -- which is a much longer duration than a typical statute of limitations (I think it's 10 years in my state) -- that basically protects a previous property owner for any flaws or problems in a property that was transferred to someone else a long time ago. Apparently it often comes up in condominium situations when a developer builds a project, forms a condo association, and then sells off individual units to new owners.
Regardless of what the actual law is on this, the reality is that if you can get away with it, then it is legal.
It’s really just a form of extortion or tribute where the extortionist keeps the demand just below the threshold of where it becomes economically feasible for the victims to fight back.
They send you a letter demanding $100 and you are going to pay it and end the matter. No one is going to fight city hall for that kind of money. Government taxing authorities do putative things like that all the time.