When tapped by JFK to be Secretary of Defense in 1960, McNamara was a registered Republican. Known as a liberal Republican – now an extinct species – McNamara explained later that "… when I had registered to vote in California at age twenty-one, I had registered Republican for no other reason than that my father was." (*)
I understand this to mean that he had registered as a Republican in 1937 because of family tradition and, either through laziness or inertia, had never changed it.

His middle name, in case you are wondering, is his mother’s maiden name. The Strange family traces the name back through Missouri and Virginia to Scotland. His mother’s family tree is chock full of Southern Scots-Irish whose American roots go back to Colonial times. In contrast, McNamara’s father Robert J. McNamara, who died in 1938, was the son of Irish immigrants from County Cork. (†)
-------------------------------------------------------------------------------------------------
* In Retrospect: The Tragedy and Lessons of Vietnam. (Robert S. McNamarawith Brian Van De Mark.) New York: Times Books, 1995
† The Living and the Dead (Paul Hendrickson) New York: Alfred A. Knopf, 1996