I read on a physics textbook by Griffiths that the Dirac delta function is defined by $\delta(x)=0$ if $x\not=0$ and $\int_{-\infty}^{\infty}\delta(x)dx=1$. As a distribution, the Dirac delta function is defined by $\delta(f):=f(0)$, where $f:\Bbb R\to\Bbb R$ is infinitely differentiable and has compact support. However, I feel like the latter definition does not capture the idea of the former definition for several reasons:
$1.$ A relation is given in the textbook as $$\delta(kx)=\frac{1}{|k|}\delta(x)$$ for nonzero constant $k$. This concept is only captured by using change of variable, but not by defining Dirac delta explicitly as a distribution.
$2.$ The author gives several problems on evaluating integrals involving Dirac delta, with an example (after changing some numbers, I don't know if there are copyright issues) being $\int_{-8}^{8}x\delta(x-5)dx$. It is obvious that $x$ is not a test function. But several expressions similar to this are written in the book anyway.
$3.$ The author gives several problems on evaluating integral involving Dirac delta function over a compact set (like a region bounded by a cube or sphere), just like the above example. We can use case-defined functions or step functions to simulate integration over a compact set, but the result is that we get a function that is not a test function.
Could it be that definition of Dirac delta function as a distribution didn't really capture physicists' idea? Or is the definition already good enough for all practical applications in physics and other fields (that is, good enough for solving real problems in their fields rather than calculating an integral that comes out of nowhere)?