Actually, that question can be reversed and be just as true. If a mountain lion attacks you in the local park in the middle of a major established sub-division the way you worded the question is accurate, but the key thing to remember here is that there is a reason why it's called a mountain lion, and not a mall cat or a lounge lizard.
About 35 years ago, I killed a huge timber wolf about 3.5 miles from Los Angeles International Airport in the city of Lawndale. During the night, it had killed a couple of german shepards, a st. bernard and who knows how many little dogs.
I killed it in a school yard while very small (kindrgarten and elementary students were arriving at the school) and before any of the kids tried to pet the big "doggy".
After killing it we discovered it had a "choke" chain collar on it. Apparently somebody in the wealthy neighborhood of Palos Verdes Estates (where the attacks on the dogs began) kept this beast as a pet.