but [tipping] is meant to be for a good job
Yes, in theory, but in practice it's standard to (almost) always leave a tip. Even if the service is merely "bad", then you generally leave a tip on the low end of the scale. If it really is appalling (ie, they got your order completely wrong, or were excessively slow for no good reason), then you leave a very low tip (ie, 5%), or leave the 1-cent tip if you want to send a pointed message. I think I've only ever done that once or twice (and I eat at restaurants a lot).
It's not legal to pay staff less than the minimum wage excluding tips, so that's not really the issue. However, minimum wage (in the United States) is paltry ($7.25/hr) compared to other countries like Canada ($10+) and Australia ($16). And then, service staff are often paid on the low end of the scale, despite the relatively difficult nature of the work.
So it's a sign of respect to tip generously as a policy; and there is a stigma attached to being too cheap, for which poor tipping is presumed evidence.