It's really a pitfall. To paraphrase the horse_unix twitter account: "the definition of operator[] is extremely simple: m[k] is equivalent to (*((m.insert(value_type(k, data_type()))).first)).second."

I wouldn't be surprised if Bitcoin Core itself also had a minor bug or two due to strangeness with [. In general using the explicit .find() results in more clear code.