Perhaps you'd be interested in a little more generality.
If $G$ is any finite group (say of order $n$), there are notions of representations of $G$. These are just homomorphisms $\rho:G\to\text{GL}(V)$ where $V$ is a f.d. $\mathbb{C}$-space. Such representations are called irreducible if the only non-trivial $\rho$-invariant (i.e. invariant under all the linear transformations in $\rho(G)\subseteq\text{GL}(V)$) subspaces of $V$ are the trivial ones.
Given any representation $\rho$ of $G$, one can associate to it a character $\chi_\rho:G\to \mathbb{C}$ defined by $\chi_\rho(g)=\text{tr}(\rho(g))$. The set $\text{irr}(G)$ of irreducible characters is merely the set of characters coming from an irreducible representation of $G$.
Now, while it may be non-obvious, the set $\text{irr}(G)$ is finite. In fact, a simplistic bound is that $\#\text{irr}(G)\leqslant n$, and in fact, $\#\text{irr}(G)$ is the number of conjugacy classes of $G$. This comes from the non-obvious fact that if $Z(\mathbb{C}[G])$ denotes the set of class functions on $G$ (i.e. functions $G\to\mathbb{C}$ which are constant on conjugacy classes) then $\text{irr}(G)$ forms a basis for $Z(\mathbb{C}[G])$. In fact, not only do they form a basis, they form an orthonormal basis. Of course, the obvious question, is with respect to what inner product? While it may seem opaque at first, if you haven't seen such matters before, the correct inner product on $Z(\mathbb{C}[G])$ is the weighted convolution:
$$\langle f_1,f_2\rangle=\frac{1}{|G|}\sum_{g\in G}f_1(g)\overline{f_2(g)}$$
Now, there is serious verbiage needed to justify why, in fact, the irreducible characters of $G$ form an orthornormal set with respect to this inner product. But, once this verbiage has been doled out, you get (by mere definition) the following equality
$$\frac{1}{|G|}\sum_{g\in G}\chi_i(g)\overline{\chi_j(g)}=\langle \chi_i,\chi_j\rangle=\delta_{i,j}$$
if $\text{irr}(G)=\{\chi_1,\ldots,\chi_m\}$. This is the so-called first orthogonality relation for irreducible characters.
The first in first orthgonality relation surely hints that we're not done--and we're not. There is a second orthogonality relation:
$$\frac{1}{|G|}\sum_{\chi\in\text{irr}(G)}\chi(g)\overline{\chi(h)}=\#(\mathbf{C}_G(g))c(g,h)$$
where $\mathbf{C}_G(g)$ denotes the centralizer of $g$ in $G$, and $c(g,h)$ is $1$ if $g$ is conjugate to $h$, and zero otherwise.
Now, at this point, you may be really confused as to what this has to do with your question. The answer is somewhat simple, but perhaps non-obvious. Note if $G$ is any group, and $\chi$ is a homomorphism $G\to\mathbb{C}^\times$, then in fact $\chi$ is a representation of $G$--since $\text{GL}_1(\mathbb{C})=\mathbb{C}^\times$. Moreover, since $\mathbb{C}$ has no non-trivial subspaces, such homomorphisms are trivially irreducible! Lastly noting that the trace of something in the range of $G\to\text{GL}_1(\mathbb{C})$ is nothing but the value that $\chi$ takes at the point of $g$, we can see that, in fact, $\text{Hom}(G,\mathbb{C}^\times)\subseteq\text{irr}(G)$. Now, I told you that $\#\text{irr}(G)$ is the number of conjugacy classes of $G$, and so when $G$ is abelian, $\#\text{irr}(G)=n$. But, if $G$ is abelian, say, you know that $\text{Hom}(G,\mathbb{C}^\times)\cong G$ (why?), and thus we can piece everything together to see that $\text{irr}(G)=\text{Hom}(G,\mathbb{C}^\times)$.
Thus, for an abelian group $G$, the orthogonality relations read as follows:
$$\frac{1}{|G|}\sum_{g\in G}\chi(g)\overline{\psi(g)}=\delta_{\chi,\psi}\qquad \chi,\psi\in\text{Hom}(G,\mathbb{C}^\times)\qquad\mathbf{(1)}$$
and
$$\frac{1}{|G|}\chi(g)\overline{\chi(h)}=|G|\delta_{g,h}\qquad \chi\in\text{Hom}(G,\mathbb{C}^\times)\qquad\mathbf{(2)}$$
Your two equalities are then special cases of these two identities. Indeed, for your first equality, let $\psi$ be the trivial character, i.e. the trivial map $G\to\mathbb{C}^\times$ in $\mathbf{(1)}$. For your second equality, let $h=1\in G$ in $\mathbf{(2)}$.
You can find proofs for the orthogonality relations in any good book on representation theory.
The above may not be of help to you, being at a possible opaque level of generality, but it's nice to put the theory of Dirichlet characters in the more general context of representation theory of finite groups. This elucidates "why" these identities occur, opposed to cute tricks like the proofs you gave above (which are totally fine, just more opaque). I hope this entices you to read more into the beautiful theory of representation theory. For a simple point of view, taking the attitude similar to what I talked about above, I would highly recommend Steinberg's book on the subject.
The group $(\mathbb Z/8\mathbb Z)^*$ has order $4$ and it is isomorphic to $C_2\times C_2$, where $C_2$ is the cyclic group with 2 elements. Now $\hom(C_2\times C_2,\mathbb C^*)\simeq \hom(C_2,\mathbb C^*)\times \hom(C_2,\mathbb C^*)$, which means that there are 4 characters of $(\mathbb Z/8\mathbb Z)^*$ because $|\hom(C_2,\mathbb C^*)|=2$. Now $\hom(C_2,\mathbb C^*)$ is the following set: there is the trivial morphism sending everything to $1$ and there is the morphism sending $t\mapsto -1$, if $C_2=\{1,t\}$. So we just need to describe an isomorphism $(\mathbb Z/8\mathbb Z)^*\to C_2\times C_2$ and then compose everything. For example one isomorphism is the map sending $[1]\mapsto (1,1)$, $[3]\mapsto (t,1)$, $[5]\mapsto (1,t)$ and $[7]\mapsto (t,t)$. This means that the four characters are the following: the trival one, the map sending $[1],[3]\mapsto 1$ and $[5],[7]\mapsto -1$, the map sending $[1],[5]\mapsto 1$ and $[3],[7]\mapsto -1$ and finally the one sending $[1],[7]\mapsto 1$ and $[3],[5]\mapsto -1$.
Now you have to check which one of them are primitive and which others are not. This is easy because the only nontrivial divisors of $8$ are $2,4$. Now clearly none of these characters can be defined modulo $2$ (apart from the principal one of course), so you just have to check modulo $4$. For example, the first nontrivial character that I mentioned cannot be defined modulo $4$ because $3\equiv 7\bmod 4$ but $[3]$ and $[7]$ have different images.
Best Answer
I've never heard of a Dirichlet character, so this is an adventure for me too! Maybe my thought process will help out.
Let $G = \Bbb Z/q\Bbb Z$, so that $G^* = (\Bbb Z/q\Bbb Z)^*$.
Let's pick apart the definition for a bit. By requiring $\chi(a) = \chi(a \pmod q)$, we're really forcing $\chi$ to be defined not just on $\Bbb Z$, but on $G$ as well. For $a \in \Bbb Z$, let $[a]$ denote the equivalence class $\{n \in \Bbb Z: n \equiv a \pmod q\}$. Now it shouldn't be hard to believe that, given a function $\chi : G \to \Bbb C$ satisfying criteria 2. and 3., that it can be extended to a function $\chi: \Bbb Z \to \Bbb C$ by criteria 1; that is, making it periodic, modulo $q$.
Now let's look more closely at criterion 2. We already mentioned that we can view $\chi$ as a function $G \to \Bbb C$, could we also view it as a function $\chi: G^* \to \Bbb C$? Of course! And it turns out that not only is $\chi : G^* \to \Bbb C$ a function, it's a function that makes groups happy: A homomorphism! This is exactly what criterion 2 forces; we have $$\chi([ab]) = \chi([a][b]) = \chi([a])\chi([b]).$$
Now that we have a homomorphism, all sorts of wonderful things happen. For example, we know that $\chi$ only maps things to complex roots of unity. This is because the size of $G^*$ is $n = \phi(q)$, Euler's totient function. For $[a] \in G^*$, we have $[a]^n = [1]$, and since $\chi$ is a homomorphism, we have $$1 = \chi([1]) = \chi([a]^n) = \chi([a])^n = 1;$$ in particular, $\chi([a])$ is an $n$th root of unity.
Let $\hat{G^*}$ be the set of characters $G^*: \to \Bbb C$. The big question question is: How do we multiply characters $\chi_1$ and $\chi_2$?
One sensible choice would be to define \begin{align*} \chi_1\chi_2: \Bbb G^* &\to \Bbb C\\ [a] &\mapsto \chi_1([a])\chi_2([a]). \end{align*}
It seems reasonable that the character
\begin{align*}\hat{1}: G^* &\to \Bbb C\\ [a] &\mapsto 1\end{align*} would act as the identity character, and you can verify that it does.
We can define inverse characters pointwise; given $\chi \in \hat{G}^*$, we define $\chi^{-1}([a]) := (\chi([a]))^{-1} = \chi([a]^{-1})$.
Unfortunately, this is about as far as I've made it; but here's a reference to help you forward: http://www.math.uconn.edu/~kconrad/blurbs/grouptheory/charthy.pdf
These notes by K. Conrad have the theorem that we need, and it's theorem 3.12: That an abelian group is isomorphic to it's dual. I realize I've left only scattered and disjointed breadcrumbs, and stopped short of the main course! But hopefully the group of characters is slightly less mysterious.