The approach indicated by @AlexanderKalmynin is a good heuristic, for sure.
Still, there is a somewhat larger context that may be more explanatory, depending on one's tastes.
Namely, we can see that we are talking about Fourier expansions of Dirac combs, that is, sums of Dirac deltas over a lattice $L$ in some $\mathbb R^n$. Then it's not exactly that the value on the lattice is $1$ (in a Kronecker delta sense), but that it's $0$ pointwise off the lattice. Maybe $+\infty$ on the lattice, but that's not exactly right, either. Being pointwise $0$ off the lattice is entirely correct.
For simplicity taking $L=\mathbb Z^n$, the naïve way to write a Fourier expansion for the periodic Dirac delta, the Dirac comb $u$, is correct:
$$
u \;=\; \sum_{\xi\in \mathbb Z^n} 1\cdot \psi_\xi
$$
where $\psi_\xi(x)=e^{2\pi i\langle x,\xi\rangle}$. A reason to not write this as a pointwise equality (with argument $x$, etc.) is that it does not converge pointwise at all. It does converge very well in a Sobolev space $H^{-{n\over 2}+\epsilon}$, for every $\epsilon>0$. Probably it's not worth going into the details of this, so much as just letting on the key words, and noting that there definitely is a way to make this as rigorous as one wants.
But, again, the rigor has some cost… and if we have a good heuristic (that somehow we know to be good), that's possibly even better! :)