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,
The name segment comes from the memory management techniques used in older times, which is now replaced by paging. I believe the name text comes from the analogy with the novel. Like the text in the novel, the code can be thought of as a piece of text in a novel. The text section of the code tells describes the code or it tells the story of what the program does.
I agree with kdgregory's answer, but I think the the binary text
notation came from this fact.