My experience with work “friends” has always gone this way:
I try to be friendly and approachable.
People start asking you consistently for favors, help, and to stick up for them and their issues. I also find that the more they know about you, the easier it is to ask for shit (“hey I remember you said/are/live around/have X, so I was wondering if you could do Y for me”)
Once that happens it’s impossible to shake them off without sounding like an asshole.
The only solution I see to this curse is to just avoid getting cornered in that situation. I avoid most socializing because of that.
Now add to this the fact I’m severely underpaid compared to the rest of the team (who do the same thing I do), that I got a promotion with no raise, and than my duties consistently increase, then it would be clear why I only do what’s needed for the job.