What I'm curious about - kind of like how some people just seem to know what to do on the dance floor seemingly without hesitation and for others it is a complete mystery - I don't really have good instinct for situations like this - my dad for instance would have taken a course of action here without second guessing himself, etc. while for me I'm not really sure whether the best thing to do (or even if there is a best thing) was to just continue past with the traffic or intentionally slowdown potentially causing drivers behind to have to react.
There's a few things going on here.
1. Space. Leaving space means more time to decide, react, is more thinking time, braking time, etc. It makes your decisions easy, because they are not in a last moment panic. I find people who do most of their driving in cities are often caught out when having to deal with fast roads where things happen much further in front of you.
2. Anticipation. People who don't look far enough up the road get caught out. They are looking at what is going on, not what is likely to happen. They accelerate up behind a slow moving vehicle, and then get stuck unable to move out and overtake, because the rest of the traffic is moving faster. They didn't look up the road far enough, they didn't anticipate that they would close on the slow moving vehicle, and then need to move to an overtaking lane. If they had, they could have done is sooner, more easily, and maintained momentum.
3. Momentum. On faster roads, momentum is important. You want to keep a flowing progress, not being at a vastly different speed to the traffic around you. You don't want to get behind something slower, and then not have the momentum to join faster traffic and overtake.
I would not have slowed down for the blue car (unless I was almost as slow already), because on a fast road like that, you can't get into the outside lane and slow down because cars behind you can be caught out. As soon as you are doing unexpected things (like not taking your right of way or making progress at the expected speed) people can get very confused and start driving unpredictability. Your "driving body language" becomes difficult to anticipate for those around you. Someone might have come up behind you as you were slowing, and then had to swerve around you and hit the blue car or moped they'd been unsighted of.
Ideally you want to control those around you by they way you drive and position your car so that they understand what you are going to do, and respond accordingly.
So, to answer your more general question on how people know what to do, everyone on the road has a kind of "driving body language", and you can anticipate what they might do based on that. You did it yourself when you saw that the blue car was being somewhat poorly driven. Like a lot of skills, some people have a natural, instinctive ability to read the traffic conditions and the drivers around them. Some people can learn those skills. Some people are hopeless and never really have an understanding of traffic and unknowingly rely on everyone else around them to not get squashed. [*]
Let's face it most people pass their tests and then never give a second thought to how they drive, improve their skills or learn from their mistakes.
[*] I saw it happen today. A car in front of me cruised up a slip road to the A40 at about 35-40 mph and made no effort to accelerate. At this point I hung far back and left a lot of space because I knew he was a poor driver. The guy cruised into the inside lane, oblivious to the very large DHL arctic doing 50-60 in the same lane, and didn't bother to accelerate to NSL speeds. The DHL truck driver was caught out, and closed very rapidly. Although he'd left plenty of space, he was obviously expecting the car driver to actually speed up to join the traffic. Instead, he had to do a quick swerve and lane switch to overtake (luckily there was no one in the middle lane). On passing the car, it was a little Indian man with earphones in, dancing and singing with with music, and not realising how close he came to getting crushed into the front of an arctic.
I saw it all happening before it came together, and stayed well clear until the scene unravelled safely.