I thought it came largely from Fr. Drinan influencing the Kennedys after JFK.
In any event, we all know the Kennedys did and supported all kinds of stuff that wasn’t in agreement with Catholic teaching,at least on a personal life level. Whether they would make it part of their political platform depended on whether it would gain or lose votes or other needed support. Like all politicians, they pretty much did most anything for a vote. The only possible exception IMHO was Bobby.