The secondary target only applies when using the Multiple Attack rolls optional rule and only when splitting an attack into multiple attack rolls.
An Artillery attack would not get the modifier (unless it was also using the multiple attack rolls to make separate attack rolls per point of damage, and only if the artillery damage was split between multiple targets). Same with large units that have multiple attacks without using that optional rule (dropships, mobile structures, etc).