Human vision is selective.
We don't see everything.
If we're photographing someone, we're apt to be concentrating on his or her expression.
We are less likely to notice an ugly background.
However, our cameras will record the ugly background.
Practice becoming aware of everything in your viewfinder.
Working on a tripod makes this practice easier.
Make a written list of things to look for in your viewfinder.
For example, if you're doing portraits, you've got to check if the nose shadow is distracting.
You can even put it on the back of your camera.
Soon, the written list will become a mental list that you'll automatically check.