It's partly that, but also a matter of human drivers trusting each other to some extent. In congested areas if you leave the recommended safe stopping distance then another driver will always cut in front of you. So people adapt by closing up the gaps and hoping the drive in front doesn't do anything stupid.
I find this one interesting. I rarely drive in the city, so when I do the distance in queues seems pretty crazy. But at some point I stopped caring that people cut in in front. The active cruise control keeps my distance now (apart from when we're stopped) and often people will use that gap. But... so what? Let them and keep your distance again. It really improves the experience.
If you try to account for it, it's not much time at all. And you're improving traffic flow by providing a means to change lanes (a bit more) safely. Most people "cutting in front" are actually just in search for a spot.