I had a game where I was gifted a Legion by a city state. Rome wasn't even in the game.
Has this happened to anyone else?
Every militant city state has access to one (and only one) of the unique units available to other full Civs. If you are eligible to receive units from a city-state and your technology gained is at the point that would give you access to that unit, you'll get that unique unit when they gift to you.
Open a militaristic city-state's information window and mouse over the words "Trait: Militaristic" to view a tooltip indicating which special unit the city-state will gift to an Ally who has researched a specified prerequisite technology.
Recall that a city-state may have any number of Friends, but only one Ally at a time. Militaristic city-states gift units more frequently to Allies than to Friends, and will only gift their special unit to their Ally. If the Ally hasn't researched the technology required to receive the special unit, a basic unit will be gifted instead.