In the Victorian era, there was no such thing as indoor plumbing, and people would throw their faeces out of the window. Most people think that top hats were worn to be fancy but in fact they were worn so you wouldn’t get your head covered in shit.
When hatless people were walking home drunk at night, they would hear “Look out!", and in their very drunken state they would look up to see who was shouting and get a bucketful of shit straight in the face. And that, is the origin of the term “shitfaced”.