It seems that there is a bug with legendary tier 5 gear from quests which prevents them from having the last perk.
For random gear score items (500-600 for example), the game will remove the last perk if the item is not exactly 600 gear score, downgrading the item to epic, but quests mistakenly apply this limitation to fixed gear score items too.