When painting from photos or from life, you are the one who gets to decide what stays and what goes in your work. If you have a photo of a scene you'd like to capture on canvas, but feel that the background is too distracting - replace it with another background or edit the existing background to work better. Just make sure that it's contextually relevant and that it doesn't detract attention away from your main subject. How can you do that?
Here are a couple of examples of how I solved that problem on some of my paintings from 2008 (back when I did a lot more note-taking and sketching of my pieces):
Patrolling Bourbon Street: Partial background edit using another photo
In the painting above, "Patrolling Bourbon Street", my original photo was backed by a quiet side street. I wanted to show more of the business of the street, so I took another photo that had a characteristically crowded New Orleans party crew in it and just merged the two a bit.
First Kiss: Complete background swap using another photo reference
In this example, "First Kiss", I had a background that was too busy and distracting. So I actually grabbed a photo from my mom's garden, blurred it in photoshop, and then used it as the background instead. Creating a blurrier background helped keep the focus on the main subject.
Pickin' Dandelions: Creating a better background using known design principles
Finally, sometimes you have to paint a background as you see it, step back and revisit before editing it to work more effectively! In "Pickin' Dandelions" I had originally included that dark strip of shadow in the background at the top of the painting. After revisiting, I realized that the dark shape was pushing my background too far forward, and instead I wanted to push it to the background where it belonged. I added some lighter greens to the top area, with more blues to cool the temperature of the grass in the distance.