Fitz started out as another patronymic (son-of). So Fitzgerald is son or Gerald, much like O'Banion, MacDonald, Swensen, Johnson, and many others.
The story become twisted with Fitzroy (Fitz Roi) or son of the king. In royal families, bastard children were simply called Fitzroy or simply Fitz, no fancier title like Duchess or Princess or any other the other titles available to royalty. By not awarding the additional titles that signified property, power or precedence, the clear conclusion was: (royal) bastard.
Over time Fitz became synonymous with bastard.
"Fitz is what Burrich calls me."Assassin's Apprentice by Robin Hobb
She flinched slightly. "He would. Calls a bitch a bitch and a bastard a bastard, does Burrich."