>>4981601According to Wiktionary, the sexual term appears to be...
"From Middle English schaggen, a variant of Middle English schoggen (โto shake; shake off; trembleโ), of uncertain origin. Perhaps a byform of Middle English schokken (โto shake; move rapidlyโ), related to Middle Low German schokken (โto shake; trembleโ). Alternatively, perhaps ultimately from Proto-Germanic *skakkลnฤ
(โto shakeโ), specifically continuing a post-Proto-Germanic variant *skagg-, where the non-singular stem *skag- caused the analogical replacement of the stem-final voiceless geminate consonants with voiced geminates, which was then leveled throughout the paradigm."
As for the Birds, the term derives from shag as meaning rough or coarse hair, and refers to the head crests and tufts that a number of Cormorant species possess, either year-round or just during the breeding season.
As for which labeling was first, I haven't been able to determine.