Used when you unwittingly do something that you know is a dumb idea but you do it anyways.
When you let a dog off his leash around a group of chicken. Inevitably "The Dog Bites the Cock".