The above is an anchor, the normal click behaviour is to change location to the url, which in this case is a svg image, not a location.
but by attaching a click event handler, the event handler runs before the default action.
In the event handler you can prevent the default click action by using:
preventDefault();
As the event handler is attached to the a tag it is not going to propagate but adding
e.stopPropagation();
does no harm but adding it is a good habit to get into.
The:
e.stopImmediatePropagation();
Stops any subsequent event handlers attached to the a element from running.
Not always needed but can be very useful in certain circumstances.
So the only way to prevent the default behaviour is to attack an event handler to the element.
But why not use a button instead of an a tag?