If you summon a daemon unit who doesnt have <legion> on its datasheet, then it doesnt have <legion>. If you summon a daemon unit who has <legion> on it, it still doesnt get a replacement keyword, because you do that when you include a unit in your army (which would be at the list building stage), summoned units however are added to your army during the game. But this is not clear, maybe
GW means the same. Without the right replacement keyword a summoned daemon with <legion> wouldnt be able to receive buffs from another unit like a greater possessed.
<LEGION>
Chaos Space Marines belong to a Legion or Renegade Chapter. For simplicity we will refer to all of these as Legions, even though in truth Renegade Chapters have a different genesis.
Some datasheets specify what Legion the unit is from (e.g. Abaddon the Despoiler has the BLACK LEGION keyword, so is from the Black Legion). If a Heretic Astartes datasheet does not specify which Legion it is from, it will have the <LEGION> keyword. When you include such a unit in your army, you must nominate which Legion that unit is from. You then simply replace the <LEGION> keyword in every instance on that unit’s datasheet with the name of your chosen Legion.
However, even if a summoned daemon with <legion> gets a replacement keyword it still doesnt benefit from the legion trait, because summoned units never are part of a detachment. Only units which are part of detachments gain a legion trait.
LEGION TRAITS
Each of the Traitor Legions has been uniquely twisted by the Ruinous Powers, and has perfected its own methods of slaughter and destruction.
If your army is Battle-forged, all CHARACTER, INFANTRY, BIKER and HELBRUTE units in Chaos Space Marine Detachments gain a Legion Trait, so long as every unit in that Detachment is from the same Legion. The Legion Trait gained depends upon the Legion they are from, as shown in the Legion Traits table. For example, all such units in a NIGHT LORDS Detachment gain the Terror Tactics trait.
REINFORCEMENT UNITS
If a unit is ever added to a Battle-forged army during the battle, it is never considered to be part of a Detachment. This means that it never costs CPs to include them in your army but they will never benefit from any Detachment abilities.