The origin of "screw the pooch" is lost in history, as both the concept of wasting time and
f*cking up very badly have been plausibly presented as the first meaning. (The real term is "
f*ck the dog", but you can say "screw the pooch" in public.)
As a term for screwing up, the origin is believed to be what pilots called crashing into water, or "augering in". One can easily visualize the implied level of error, possibly as a terrible result from a overzealous consumption of congratulatory drinks from the day before. If you're f*cking your dog, you've made a serious error with major ramifications.
As a term for goofing off, what could be more frivolous and wasteful than screwing a dog?
The primary meaning has shifted back and forth over the years, but I believe more in the screwup definition. As military terms go, the most colorful language comes from combat, and there are few other terms for failure as eloquent.
In addition, "screwing the pooch" is a semiserious way to acknowledge error as a reflexive pronoun, a far more useful application than calling someone lazy . I learned a lot of ways to goof off during my years in the service, but I've never heard anyone say "I'm going to go screw the pooch".