According to wiki's Modular Arithmetic page:
...denoted ${\displaystyle a\equiv b{\pmod {n}}.}$
(some authors use $=$ instead of $≡$ ; in this case, if the parentheses are omitted, this generally means that "mod" denotes the modulo operation, that is, that $0 ≤ a < n$).
Do the parentheses around mod matter? What seems to determine whether three or two lines are used is an operation (which it is if it isn't in parentheses). If so then why do we have to distinguish between $\equiv$ and $=$?
Mod is not an operation$^1$!
This is a cause of confusion for many students I have started adopting a new notation to clarify this $$17\hspace {.1 cm}\overset{\displaystyle \equiv}{\tiny mod 5} \hspace {.1 cm} 103 $$ The point is that $\mod 5$ is something that modifies the equivalency and not one side or the other. It is no operation. The numbers $17$ and $103$ are in the same category if we are considering what their remainder is after we divide by $5$.
$1:$ Except when it is... The confusion here is that mod IS an operation whenever you talk to a computer scientist/programmer. It's just not an operation in the community of mathematicians.
To confuse the matter: Mathematicians also explore a mapping which is used in a slightly different way from these computer scientists/programmers. If you are interested you can read the comment thread below and I invite you to inquire.