I've seen that exact same scenario.

Leaning the bike at fast but safe speed in a left curve for the fun of leaning as I was all alone, suddenly I get passed on the right by 20cm (while there was 4 meters between me and the edge of the curve) by a Benelli 600 rider, full throttle. Scared the sheet out of me.

I guessed he saw me leaning and wanted to teach me how.

At the exact second he passed me, the car 15 meters in front of us turned its blinker on, and started deviating right. Bingo.

He then "performed" a panicked emergency braking in 3 or 4 hard squeezes locking the front wheel at each squeeze, going straight at the car while there was 3 meters of empty space available on each side of it.

The guy finally did brake enough not to hit it, missing its rear bumper by just a few cm.

Then he stopped at the red light 50m ahead after which he drove slow, probably wet his pants...