Dogs have complex pooping rituals, as any dog owner knows. Once they've finally found the perfect pooping place (after approximately one billion hours of sniffing around), some dog owners report that their dogs will maintain eye contact with them while they poop. While this may seem awkward to us humans, your dog isn't trying to be weird. Instead, he's using deeply-rooted instincts to keep himself safe and comfortable.
By maintaining eye contact with you, your dog is probably trying to make sure you're on the lookout for predators while he's relieving himself. In the wild, predators can take advantage of this vulnerable position, and having a fellow pack member on the lookout is helpful. By locking eyes with you, your dog is making sure you're doing your due diligence to protect him from predators.
If your dog stares at you while he poops, there may be an even simpler explanation. Dogs gaze at us to show us that they like us. While pooping may seem to us like a weird time to do it, your dog might just like you and feel like showing it. Maybe he's grateful for the protection you provide while he poops. Awww!
Dogs are great observers of human behavior. Sometimes, when they stare at us, they're simply watching for our next move. This may also tie back to protection: While in the vulnerable position of relieving himself, it benefits your dog to know what you're going to do next. He's probably hoping it's "protect the dog."
Your dog may stare at you while pooping for any and all of these reasons, or he may not look at you at all when pooping. All of these behaviors are normal, so don't worry if you observe any of them. Dogs don't share our shame around pooping, so they see no reason not to stare at you lovingly while doing it. What a profound lesson to us all.