Each to their own. In a street like in the picture, I wouldn't mind moving over like she did to let the cars go past. While on a wider lane if cars are parked to the side of the road, with possibility of pulling in as I approach, I'd take the lane just to be sure I'm away from them and have manouvering space.
The pass in the picture is as safe as it gets IMO. When taking the lane, cars move over to the other lane and pass closer to me than that one in the picture. Sometimes deliberately as close as they can because I've slowed them down.
I try to read the situation and adapt, so that neither I'm in danger, nor are drivers slowed down by my bike more than it's necessary. For the last 30 years, got a habit not to move an inch to the left without checking over my shoulder and that's turned out to be the most important safety habit of all.