When parents call their kids “??????” (xi??o gu??), aka “little devil/ghost” they usually mean it in a teasing, loving way. But there’s another reason why parents sometimes call their kids little demons (or little pigs, or little dogs, or some other somewhat demeaning term).
It’s been said that in the past, superstitious Chinese people believed that they could protect their kids from roving, kidnapping demons by calling their kids put-down names.
It’s kind of like, “Hey, demon! You don’t want my kid. He’s just a little devil/dog/pig. So leave him alone, ‘kay?”