I’ve heard that argued both ways. Some people claim it cleans the lines. But my instincts are to agree with you. If the coffee ground gets greasy that would seem to give it a chance to stick in the pipe or simply stick to existing grease. OTOH, grease in the pipes can be melted by pouring boiling water down.
Since coffee is great for compost, the bulk of my coffee goes to the plants or to the compost. But I’m still keen to clean with it. Not much is needed for cleaning. 2 pinches is enough for one arm pit, or two hands. Some coffee grounds stick to my filter after shaking the bulk of it into a plant so I end up rinsing those down the drain as well.