It goes both ways. But TV was generally way behind the general culture till the 70s.
I’ll let you on something I won’t post in public:
My primary career is in IT but over the years I’ve written for a number of people including then-Speaker Newt Gingrich, Lyn Nofziger, Phil Gramm, Pat Buchanan, and more recently I was tapped by a friend to fine tune dialogue in the first season of “Jack Ryan”.
When I attended the writer’s meeting for Ryan I got to meet Jay Leno who was there to tweak some of the sly humor and then he proficiently tweaked some of the military dialogue. Impressed the hell out of me.
He’s not credited and neither am I.
The uncredited writing work/phenomenon in Hollywood is quite fascinating and it grew out of the blacklist period when communists were tapped by friends to tweak scripts (or write them entirely).