Pirsig's title (ZatAMM) is a quote from "Zen in the Art of Archery, by Herrigel, from 1948.
Many programmers, artists, and writers (myself included) find that their best work comes when they are in a state of complete un-self-consciousness, their mind fully engaged with the task. No ego, no id, just a mental model that goes from mind to hand. Surfacing, after hours in that state, is incredibly satisfying, just like meditation.
ZatAMM may well have been the source of the reference specifically for programming. But there was already a pivot to meditative practice, since the 60's, I'd suppose. Many in the west who either dabbled with eastern religion, or independently discovered the pleasure of perfect concentration in the egoless state, made the same association, thus "Zen and {mumble}".