I'm trying to understand one graph presented in our online statistics class. I understand how the numbers are calculated, I cannot understand what the number / probability is referring to, I tried replicating the same experiment and I cannot understand how the numbers in range 1-5 were received for 10 numbers, or the numbers from 1 to 40 for mean of 100 numbers.
I understand that the bars show that the mean is more likely to be in center (around 0.5), but I cannot understand what the number of their heigh exactly refers to.
Here is uploaded image of the graphs, they are received after the professor sampled N points uniformly from the range [0, 1) and calculated the mean 1000 times.
Thanks in advance.

Let $A_{10}$ be the mean of $n=10$ observations from the standard uniform distribution $\mathsf{Unif}(0,1).$ Sampled using R.
We have found a thousand averages $A_{10}.$ Here $E(A_{10}) = 0.5.$ The standard deviation of the population $\mathsf{Unif}(0,1)$ is $\sigma = \sqrt{1/12} = 0.28868.$ So $SD(A_{10}) = \sigma/\sqrt{10} = 0.09129.$ The mean and the standard deviation of the sample of a thousand averages matches these values very well.
For uniform data, the central limit converges to normal very fast, so $A_{10}\stackrel{aprx}{\sim}\mathsf{Norm}(\mu=.5,\sigma = 0.09129).$ This is shown by the reasonably good fit of the orange normal density curve to the histogram.
By contrast, if we look at averages $A_{100}$ of samples of size $n = 100$ observations from $\mathsf{Unif}(0,1),$ we get the following results.
Notes on plotting histograms: (1) Even though all of the one thousand averages $A_{100}$ happen to lie in $(.4,.6),$ I have maintained the interval $(0,1)$ on the x-axis of the histogram for easier comparison with the previous histogram. As the sample size $n$ increases, the variability of the averages of $n$ decreases.
(2) In the first histogram, look at the 5th bar with interval $(.40,.45]$ of width $w = 0.05.$ This interval contains $158$ of the $1000$ averages $A_{10},$ which is $0.158$ of the total. So this bar has area $a = 0.158$ and width $w = 0.05$ so it's height called 'density' is $h = 0.158/0.05 = 3.16,$ which you can compare with the scale on the vertical axis. That's how a density histogram is made.
I think the word density may be the easiest to use, but it might be called something like 'relative frequency per unit width'. In a real application, the horizontal axis might be heights, weights or dollar incomes of people; then 'unit width' might be replaced by one of the units 'inch', 'cm', 'lb', 'kg', 'dollar', 'euro', etc.
Both of my histograms use a vertical 'density' scale (so that the total area of all bars is $1).$ That makes it possible to plot normal density functions on the same axes.
(3) You can compare my simulations and histograms with the second and third of the panels of the figure you posted in your Questions.