SGML, from which HTML is derived, in its infinite kindness allows you to use as many characters as you want (not including spaces and some special characters) to name many of its non printing stuff. For example, the single letter "a" stands for "anchor" which is HTML-ese for an active link. They could have decided to call it "ahref" instead. In order for your browser to know that "a" is the symbol for what you want and "href" is the next part, rather than "ahref" is a new function you have asked for, you need the space between "a" and "href".
The same applies to the names of special symbols. If you type <a..... the browser thinks you are trying to use the special symbol named "lta". You don't want a space after "lt" because that will print as a space. So for the names of special characters you show it has ended by a semi-colon. If a space is to occur naturally, like the name of a non-ascii latin letter, then you can leave out the semi-colon.
Since most people using a browser don't want a list of the errors the maker of the HTML document has made each time he or she goes to it, the custom is for browsers to just politely ignore mistakes and pretend you didn't say it. So if it thinks you typed <ahref, it will look at the functions it knows, see there is no such thing as "ahref", and just not print anything until it reaches a place where things make sense again. That is why sometimes what you think you have typed just doesn't come out. It is the browser's discrete way of saying you have made a mistake.