inverse gamma (0.001,0.001) prior on the variance in the Bayesian hierarchical model This 8 schools data is from Gelman 2006 paper: http://www.stat.columbia.edu/~gelman/research/published/taumain.pdf. In Figure 1 (c), the prior density of inverse gamma (0.001,0.001) was overlain on the posterior histogram. The author claims that "This prior distribution is even more sharply peaked near zero and further distorts posterior inferences", which I find difficult to understand because inverse gamma (0.001,0.001) only has a very small probability near 0, e.g., $P(\sigma < 1 | \alpha =\beta=.001) = 0.006$ for the prior but the posterior $P(\sigma < 1) = .487$. So how does this prior distort the posterior towards 0?

UPDATE: Thanks so much for your reproducible code. I have accepted it as an answer.  It appears that the prior density in the plot has been scaled to the range (0,30), that's why we see a spike of inv-Gamma(0.001, 0.001) near 0. But the issue is that if you draw samples from inv-Gamma(0.001, 0.001), you are going to see the probability $\sigma < 1$ is quite small and most values would be very large, so I do not understand how this prior can still distort the posterior to have a spike near 0. PS: the CDF of the inverse gamma distribution on Wiki page is defined using UPPER incomplete gamma function, so you should look at the "uppinc" when you run pracma::gammainc(shape, scale / 1) / gamma(shape)

You're right that the $\text{inverse-gamma}(0.001, 0.001)$ prior assigns a small probability to values of $\sigma$ near $0$. As you noted, $P(\sigma < 1 | \alpha =\beta=.001) = 0.006$. However, relative to other values of $\sigma$, the most likely value of $\sigma$ is near $0$. The density near 0 is high relative to other regions. While the density assigns low absolute probability to $\sigma$ near 0, the most likely value is $\sigma$ is still near 0.
Contrast this to the $\text{inverse-gamma}(1, 1)$ prior. This prior still says that $\sigma$ should be close to 0. However, the tails of this prior drop more slowly. This means larger values of $\sigma$ are still considered plausible. Contrast both inverse-gamma priors to the $\text{Unif}[0, A]$ prior which gives equal likelihood to small and large values of $\sigma$.
The author is arguing that the inverse-gamma distribution is a bad choice for a noninformative prior. It puts most of it's density near 0, and therefore pulls the posterior distribution close to 0. Using this class of priors is like saying you expect a small standard deviation before you see any data. This is not the behavior people usually associate with non-informative priors. You're right that the posterior isn't as peaked near 0 as the prior. However, it would be even further from 0 if the prior didn't assign so much mass at 0. The $Unif[0, A]$ prior doesn't pull the posterior to 0, and, instead, let's it spread out further of the real number line.
