I don't know if anyone's posted this yet, but it WAS supposed to be two back in the day of typewriters. It wasn't a formatting issue, but rather something to do with how the typewriter physically made a space between a period and a capital letter. Now with inkjet printers and MS Word, there is no need anymore, so the correct way is to use one space.
Your teachers probably taught you to use two spaces because that is how they were taught to type back in the day. They just haven't been told to teach the correct way for some reason.