In the old days, I remember we were told to never go beyond the 70'th column in the text editor (the actual value was usually something above 70, but less than 80). [...] If it makes a difference, this was when programming COBOL.
No, it doesn't, as it was more of a feature of the underlaying priciples and standards for handling punch cards. By default column 73..80 (*1) where reserved for a numbering. A feature quite handy not only when a stack got mixed up as so often told, but much more when one needs to insert a line (or more) between two existing. Just select a number (*2) between the cards you wanted to insert and voila (*3).
Here also lies the reasoning for using 8 columns. For sure noone back then did belive that there would be ever programms with millions of lines, and especially not 100,000,000 lines. Since the sort was done as (alpha)numeric left to right, it was fine to initial use only 4 digit left alligned line numbers:
Now a line between #2 and #3 could be easy inserted as 00025 (*5).
Very soon, when Computers featured several KiB of usable memory, compilers became a feature to 'patch' source files. Now all cards of a stack where read and stored in memory before compiling. Lines where sorted in order of their line number durign read (so no more sort run) and when duplicate line numbers came in the newer (later read) line replaced any older (prior read) with the same number (*4).
Now programmers did not repunch the whole program over and over again, but composed a stack of the original programm with all cards added or replaced in chronological order. Only when it started to have more patches than program, or when editing became unreliable (as it relied on the programers memory) a new stack was punched. Again an automated process by feeding the cards into a programm reading and replacing them before outputing to a punch. And yes, that not only mimicks the process, it was a feature of many compilers to read in a programm, do all card processing regarding the 'patch' and then output the source again. Why doing a seperate utility if everything needed is already in place. Our forefathers hated work as much as we do.
In fact, not even the initial numbering had to be done by hand. Already in the pre-computer age it was common to punch cards without a numbering and then run the stack thru a routine that punched increasing numbers into specified columns. Man creates tools.
Further, at least in the program I was using (the ISPF text editor) against an old mainframe, we also could not use the first three columns as these were reserved for system codes.
Now that is unusual and may be system specific. There are in general five general formats for punch cards:
Application - column 1..80 to be used as needed
Standard - 1..72 is used for content, 73..80 is used for numbering. This was first widely used in Assembler and FORTRAN and became the standard for the IBM world
Assembler - 1..71 is used for content, 72 for continuation and 73..80 for numbering
COBOL - 1..6 is used for numbering, 7 for continuation
IBM Cobol - Like COBOL, but in addition column 73..80 is again reserved for IBM standard numbering
The last case shows a nice dilemma between a languages standard and a system wide standard. As a result COBOL compilers could be set to use either number - or check them for having the same value (*6).
Less related, for later variable length formats the sort/numbering column ent int the first 8 characters. Still the big old three, Assembler, COBOL and Fortran, did keep the ability to work with fixed length.
*1 - Columns on a punch card are numbered 1..80, not 0..79.
*2 - The 'numbering' didn't have to be numbers as it was taken as an alphanumeric sort field according to the numeric value of each char. Later on, in memory sort used the full EBCDIC value.
*3 - And thanks to card sorters one didn't have to look for the right loction to slip in the card(s). Lust add them to the stack and run your (up to) 8 sort runs.
*4 - Deleting was done by adding a card with the right line number and no program text.
*5 - It was a good idea to use a number somewhere inbetween to leave room for more line numbers. Then again, I once knew a guy who used to go just by one. So the line between 1__ and 2__ became 11_ the next insert was not 12_ but 111. Easy to see where that was going, right? No, he did ran into that problem over and over again :))
*6 - something that also happened with at least one Mainframe BASIC.