>>4981601
According 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.