The wave function outside an infinite well is zero, owing to the fact that we assume particles to have finite energies. But in the case of a delta function potentialdelta function potential $\delta(x-a)$, the wave function is non-zero at the point $a$.
To find the states of a delta function, we use the continuity of the wave function and the discontinuity of it's first derivative. Why don't we set the wave function to zero at $a$?