Honestly that's just playing the game right there! I've tried the whole compliment thing before and it's a total roll of the dice. Sometimes you get a freebie, sometimes the waiter just nods and walks away. Feels like you caught someone on a good shift where they had extra dessert to spare. I wouldn't count on it as a real budget plan, but hey, free cake is free cake!
Honestly used to think the same way as you. Figured it was all just random chance or a kitchen mistake. Then this one pizza place started hooking me up with extra garlic knots every single time I chatted with the guy at the counter. Not just a one time thing. Makes you realize some folks just appreciate a bit of friendly talk. It probably depends on the person working more than anything.