to do sth that is not helpful to sb or that gives a bad impression of them
do sb no favours
to do sth that is not helpful to sb or that gives a bad impression of them
You're not doing yourself any favours, working for nothing.
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition