Why are these two double integrals different ? A question on Dirac delta distribution
What happens is that the delta "function" is not a function. Integration against $\delta\, dx$ simply means integration against the delta measure $$\delta(E)=\begin{cases}1,&\ 0\in E\\ 0,&\ 0\not\in E\end{cases} $$
There's no need to make this about double integrals. Your question would apply just as well to the two integrals $$\int_{[0,1]}\chi_{\{0\}}(x)\,dx=0$$ and $$\int_{[0,1]}\delta(x)\,dx=1,$$ which are different even though $\delta$ and $\chi_{\{0\}}$ are the same everywhere except at $0$. The explanation for this is simply that $\delta$ is not actually a function and its "integral" is not actually an integral in the usual sense. It's a theorem that if two integrable functions agree except on a set of measure zero, then their integrals are the same. But $\delta$ is not a function at all, so that theorem doesn't apply. Instead, $\int_{[0,1]}\delta(x)\,dx$, though written as an "integral", is actually simply defined as the evaluation of the distribution $\delta$ on the constant function $1$. Since $\delta$ is by definition the distribution that takes a function and outputs that function evaluated at $0$, this gives the answer of $1$.
Intuitively, $\delta$ is a "function" that gets infinitely large at the point $0$, such that even though it's just one single point, the "area" under it somehow manages to be positive. But it's not actually literally the function $\mathbb{R}\to[-\infty,\infty]$ that is $\infty$ at $0$ and $0$ elsewhere; that is an actual genuine integrable function whose integral is $0$.