In my own experience, I use "keep it up" as a short version of "keep up the good work", and I use this not as someone with vested interest, some authority, or anything other than encouragement for the target person to keep doing good work.
It doesn't matter if this is something they are doing at work, for themselves, for their partner/spouse/kids, or whatever, just as long as they enjoy it and are getting what they want from it. They could simply be getting close to paying off a loan and be expressing excitement about how they'll be out from under that debt and stress. Maybe they are boasting about how long they've been without a drink or a smoke.
I'm definitely not stating it as an authoritative demand, but rather as encouragement.
Yes, there are times when a boss/supervisor might say "keep it up" in reference to working towards a goal, a pay raise, a promotion, or something, but that doesn't mean it always has to be used that way.
And yes, there are negative connotations, like David Siegel's answer mentions: "Keep it up, if you want a black eye."