The earliest recorded use of the phrase - from around a century ago - was from a soldier commenting on someone's ability at shooting...ie "can't shoot for toffee". I wonder, therefore, whether it might have started life as a reference to a prize of sweets at a fairground shooting-gallery, before becoming a bit more serious during World War I. Just an idea.