My theory: Dogs are pack animals and they will assume submissive postures to members of the pack that have a higher status. A dog that gives you the “guilty” look has broken a pack rule and views you as higher ranking pack member that is about mete out discipline.
This may also be why dogs left packs to bond with humans. In the pack the alpha dog might just kill them. In dealing with humans - if the dog looks sad then the human usally says okay that is alright. You are a good boy or girl. Most humans are more forgiving than an alpha dog.
I think you’re right. My dogs have been admonished their whole lives when they do naughty stuff. They know when they do something on my “naughty” list that I’ll not be my usual happy go lucky self with them. Dogs innately understand body language and facial expressions within their own kind and also with humans, particularly with humans with which they have a long history.
God love a good dog!
****** Good theory and in case of poo on the floor, that dog is right. But he knows he did something wrong, I could still go with guilt...