Before computers, people used typewriters and were taught to use two spaces after period. Typesetters knew to use the right space. Early computers were mostly monospace. Word processors introduced variable fonts and were smart enough to collapse two spaces. Email and text editors were monospace. The web made everything proportional and collapsed two spaces to one hiding any difference in source. One space has won enough that people use one space in monospace text.