To understand why the delta function under an integral picks out a particular value of the integrand, it may help to think of it as the limit of a sequence of steps.
Let δ(t) be the Dirac delta function. We can approximate it with a sequence of rectangular pulses δn(t):
δn(t)={hn,0,∣t∣≤2wn∣t∣>2wn
Each pulse has area 1:
∫−∞∞δn(t)dt=hnwn=1
In the limit, the delta function is obtained as:
δ(t)=limn→∞δn(t),wn→0,hn→∞
The key property under an integral is:
∫−∞∞f(t)δ(t−a)dt=f(a)
where f(t) is any continuous function.
Each δn(t−a) is a pulse centered at t=a, so in the limit, the integral “picks out” f(a).
See a visual below