Here's how the lenders avoided paying HOA fees in my state & others:
"One tactic we saw frequently was when a lender would do everything necessary to complete its foreclosure except for the very final step—the recording of the deed transferring title back to the lender. The lender would then list the property for sale even though it didn’t technically own the home.
The deed to the lender would not be recorded until immediately before the closing on the sale of the home to a new owner. By not recording the deed to the lender until the last possible minute, a lender could avoid having to pay HOA assessments and the HOA had no avenue to recover those funds. The debt simply had to be written off."
https://www.charlotteobserver.com/living/home-garden/michael-hunter/article18506261.html
As the article notes, however, my state (& others) did change laws so the HOA could collect dues.