"A ship in port is safe, but that's
not what ships are built for."
I found not only its source, but also the story of an indefatigable pioneer in the nascent computer science field, Grace Murray Hopper (1906-1992) who said it.
Ms. Hopper was a Rear Admiral in the US Navy and an early computer scientist. Her list of accomplishments is impressive.
And while I’m certain you’ve heard this amusing anecdote, perhaps you didn’t realize the significance of Grace Murray Hopper’s reported role in it: