I was watching this video on signal processing:

, and the author was trying to derive a function such that
$$ y(t) = \begin{cases} x(\tau) & \mbox{if } t = \tau, \\ 0 & \mbox{otherwise} \end{cases} $$
The answer is $\int_{-\infty}^{\tau+} x(\tau) \delta(t-\tau) dt$, where $\delta$ is the unit impulse. I understand how this works, but I am wondering, why all the trouble for such a simple thing? Why not just use the first definition above?