It seems there are a number of reasons you can be spontaneously attacked by Thalmor Justicars. As the comments have mentioned, it may be related to your actions during the quest In My Time of Need. The wiki for that quest states:
If Kematu's request is accepted, and the Dragonborn helps him capture Saadia, the Dragonborn may encounter a group of Thalmor Justiciars in the wild that carry a Justiciar Execution Order with the Dragonborn's race and name.
Afterwards, it clarifies when these orders are commonly given:
Execution Orders are normally issued because of the assault on the Thalmor Embassy in the main questline during the quest Diplomatic Immunity. Thalmor Justiciars that carry a Justiciar Execution Order also appear after attacking and killing any wandering Thalmor agents.
The wiki on Thalmor Justicars states:
The Justiciars may also attack immediately if the Dragonborn is wearing an Amulet of Talos.
I suspect that last reason would not include the note you mentioned, but it is another reason why you might be attacked in a seemingly unprovoked manner.