The relevant property of a probability density is not that it sums (for evaluation on some particular $x$ values) to one, but that it integrates to one.
If you evaluate a density $f$ at $x$ values that form a regular grid with grid width $\Delta x$, then you have very approximately
$$ \int_{-\infty}^\infty f(x)\,dx \approx \sum_{i=1}^n f(x_i)\Delta x, $$
which is why your initial two examples sum to almost one: here we have $\Delta x=1$, so we have approximately
$$ 1=\int_{-\infty}^\infty f(x)\,dx \approx \sum_{i=1}^n f(x_i). $$
Compare a finer grid for the normal case:
> sum(dnorm(seq(-10,30,by=0.1), mean = 10, sd = 2, log = FALSE))
[1] 10
And of course, if we include $\Delta x$ in your calculation for dbeta
, then we again approximate the integral correctly:
> xx <- seq(0,1,by=0.01)
> sum(dbeta(xx, shape1 = 2, shape2 = 4, ncp = 0, log = FALSE)*mean(diff(xx)))
[1] 0.9998333