When should the sum of all elements of a gaussian kernel be zero?

I found an approximation of a 5x5 2D convolution kernel like this :

Here, the sum of the elements is zero and this one was used for Laplacian of Gaussian!

Another one here :

This one has all positive and the sum is not zero and is being used for smoothing.

Could anyone please tell me what is with the sum being zero in the previous case ?

References:

If your title should say When should the sum of all elements of a Laplacian of Gaussian kernel be zero?, then that makes more sense.