Where and when did the practice of using two spaces in the beginning of each sentence start, and is it still recommended?

Long long ago written matter was presented to the public largely through what was called "print"—black (or sometimes coloured) markings on an artificial membrane called "paper". At that time the aesthetics of document layout were managed by craftsmen called "printers" (or, more resoundingly, "typographers").

Eventually a machine was developed—a sort of proto-keyboard called a "typewriter"—which allowed writers or their amanuenses to emulate some of the effect of "printing". Some—but not nearly enough. Until quite late in its development the "typewriter" was limited to producing characters, points and spaces of a single fixed width. Consequently the "typewriter" was unable to match the very flexible and artistic spacing of letters and sentences effected by real "printers". To make typewritten manuscripts (or "typescripts") a little more legible the convention arose of putting two spaces after a full stop or other sentence-terminating point.

Now that the archaic "typewriter" has been superseded by modern word-processing devices, this practise is largely deprecated by publishers.


Brace yourself for strong feelings from two sides...

I believe the preference for two spaces or one is largely determined by when one learned to type. For those of a particular generation, say GenX and older, the use of two spaces was taught (because typing was taught) as a way to help mark the end of a sentence. This was particularly the case for typewriters, where the letters have a fixed width and the additional break helps increase readability. In the example you posted, the extra space helps because you use a fixed-width typeface.

Later generations will typically quote the advent of word processors, automatic kerning, and built-in typographical functions to support the use of a single space at the end of a sentence. It's not necessary and therefore should be avoided. In my experience, people feel strongly about this.

The "single space" set is largely right in that most text rendering systems will ignore the spacing you use for raw text and render it according to the rules set up by the word processor or web site, etc. Those choices are stylistic and vary according to designer preference.

Note that in the raw text for each of the respective paragraphs above, I used single, double, and triple spaces after the period-ending sentence, and the website has rendered them all the same.

You will not find a "once and for all" answer. The holy wars will wage on.

BTW, I use double spaces, because I was taught to type in the 80s. Old habits die hard; I will not try to convince anyone to do it my way, but I may well bristle against anyone trying to convince me that I have to use single spaces after my sentences. (For the record, this was an issue of no small irritation during the preparation and publication of my graduate theses.)