A democratic candidate would not campaign in a state like California that is heavily democratic because they know they are almost definitely going to win the election in that state, meaning they will get all of that state's electoral votes.