alternate leterforms (or glyphs) taught or just assumed?

When I was a kid, my school taught us how to wright using letterforms similar to what is shown in the font example page

http://www.frontiernet.net/~treehous/SchoolSample.html

Now, I am not sure if you will all see this, as it depend on the fonts you have installed on your your local machine, but take a look at the letter forms for “a” and “g” in Times New Roman vs Century Gothic

a = a
g = g

While there are certainly variations between the fonts, it always stuck me as odd that somehow we determine that the letters on the left are the same as the letters on the right. they really look nothing like each other. I also dont recall specifically “learning” in school that these are the same.

First, which letterforms for “a” and “g” came first? and why such a large difference in forms?