Traditional assembler, and higher level compilers work with several memory segments, according to intended use. Hence, there is a data segment, a stack segment, a bss,
From Wictionary:
I suggest that the meaning in computer terms is derived from the fact that the program is what is written into the computer before the program is run, as opposed to the data, which is read in, processed, and then written back out.