There are ‘tricks’ to remove the space but it is more pertinent to understand what is happening and then you can solve the problem yourself using the correct properties (as @coothead has shown above).
Tags that are inline elements (like anchors and spans) are used to mark up inline phrases and content and behave much like the words in a sentence where you leave a space between each word otherwise the words are just one long line of text. It’s perhaps easier to understand with a contrived example.
<p>This is a <i>paragraph</i> that has <span>some</span> <strong>content</strong><span>styled</span> with inline tags.</p>
If the browsers didn’t honour the space after the inline tag then your paragraph would read like this.
“This is a paragraphthat has somecontentstyled with inline tags.”
That’s why browsers respect the space after an inline tags otherwise all words would run together.
If you don’t want that behaviour (as in a list of links) then you need to change the display of the inline element to a block display (as are floats, flex items, grid items table-cells).
Traditionally a list of links is usually wrapped in the ul list structure as shown above as that seems to make semantic sense but you could also wrap the bare anchors in a nav element if you wanted as html5 allows this for the main navigation.
As to the why: Inline elements (such as links) are rendered by the browser as they are written - but multiple whitespace characters are condensed into a single space character. This allows for styling of source code without affecting output. Line breaks are considered whitespace characters, and are rendered accordingly
(There is a notable exception to this: a line break immediately following a tag opening, or immediately preceding a tag closing, is ignored under ISO8879.)