I strongly believe it's a bug.
They simply forgot to assign PROMOTION_ONLY_DEFENSIVE to this unit.
Atheen said:
Great Galleass is intended to do both roles, thats why it has no "Cannot melee attack" negative promotion. This referred in one of Maddjinn's videos.
That explanation doesn't really support the claim that it's intentional. One player says the restriction is missing. Another player says it's intentional because "the restriction is missing".
(NOW, if all ranged units were hard-coded to not melee, and it took a promotion or something to allow the unit to melee, then that could be seen as intentional design.)
Plus...
1. Firaxis wouldn't intentionally support awkward gameplay such as this. Less savvy players would frequently range attack by mistake when right-clicking on targets, probably even veteran players as well, in much frustration. And requiring attack orders outside of firing range (having to back-up just to melee) is also silly game design that Firaxis wouldn't favor either. (In early vanilla, back when the game was in a very rough state to meet the release deadline, ranged units could melee attack. I forget, but I think if you held Ctrl while giving the attack order the unit would engage in melee. But, these mechanics were all cleaned-up and the restriction was put in place.)
2. This perk would've been stated in the unit's description. Similar to how other unique units state so when their "No Defensive Terrain Bonuses" is removed or when their "Penalty Attacking Cities" is reduced or removed.