Why is the delta function the continuous generalization of the kronecker delta and not the identity function? In a discrete $n$ dimensional vector space the Kronecker delta $\delta_{ij}$ is basically the $n \times n$ identity matrix. When generalizing from a discrete $n$ dimensional vector space to an infinite dimensional space of functions $f$ it seems natural to assume that the generalization of the Kronecker delta should be an identity operator 
$$ 
\operatorname{I} f = f
$$
However it is said that the continuous generalization of the Kronecker delta is the Dirac delta function 
$$
\int_{-\infty}^\infty \delta(x - y) f(x)\, dx = f(y)
$$
Why is that the case? What is "wrong" with the simple identity operator?
UPDATE: What I mean with "simple" identity operator is: Why is the identity operator not simply the scalar number "1", but the delta function instead?
UPDATE2: To make it more clear: Why is the continuous generalization of the Kronecker delta
$$
\int_{-\infty}^\infty \delta(x - y) f(x)\, dx = f(y)
$$
and not
$$
1 \cdot f(x) = f(x)
$$
?
 A: The identity operator is the same in both cases.
For the discrete case
$$
\sum_{j=1}^n \delta_{ij} x_j = x_i
$$
and in terms of operators, $I(\mathbf{x}) = \mathbf x$ .
For the continuous case
$$
\int_{-\infty}^\infty \delta(x - y) f(x)\, dx = f(y)
$$
and in terms of operators $I(f) = f$.
A: I) Let there be given an linear operator $A:V\to V$, where $V$ is a vector space. 


*

*If $V$ is finite-dimensional, given a choice of basis, the operator $A$ can be represented 
$$(Av)^i ~=~ \sum_j a^i{}_j v^j.\tag{1}$$ 
by a matrix $a^i{}_j$. 

*If $V$ is infinite-dimensional, of the form of an appropriate function space, the operator $A$ can be represented 
$$ (Af)(x)~=~ \int \!dy ~a(x,y) f(y).\tag{2}$$
by an integral kernel  $a(x,y)$
Notice that the discrete index $j$, the summation, and the vector components $v^j$ in eq. (1) have been replaced by a continuous index $y$, an integral, and a function value $f(y)$ in eq. (2), respectively.
II) Now consider the identity operator $A={\rm Id}_V:V\to V$. In both cases (1) and (2), we may view the identity operator ${\rm Id}_V$ as multiplication with the constant $1$.


*

*In case 1, the matrix $a^i{}_j=\delta^i_j$ is given by the Kronecker delta.

*In case 2, the integral kernel $a(x,y)=\delta(x,y)$ is given by the Dirac delta distribution.
