If I hand you a uniform distribution spanning say, 0 to 1, then I can say that the probability of a variable with this uniform distribution taking on value of say, 0.3 is, equal to the probability that it takes on a value of 0.7, or 0.01, or 0.93, etc.
In other words, since the uniform distribution is flat, all probability values are equal.
Now forget about distributions, imagine a histogram from an image. If you make an image histogram, you are just measuring the popularity of all pixel values from say, 0 to 255. If all pixel values that take on a value of 0, (black), are equal to the number of pixels that take on a value of 255, (white), are equal to the number of pixels taking on a value of 123, (greyish), etc etc, then the histogram is an equalized histogram. Again, "equalized" because all pixel-popularity measures are the same.
However not all images have this same spread. If you take a picture of a scene with the sun photo-bombing it in the background at noon, most of your pixels live around the 255 area, because the sun has made most pixels white, even if they were not white to begin with.
In this case, the histogram will be heavily skewed to the right. Now, the number of pixels that are white, is NOT equal to the number of grey pixels, or the number of black pixels, etc etc.
So in histogram equalization, this we force all the pixels to take on values, such that when you come to measure the pixel popularities in the end, then will all have equal values. Hope that helps!
Edit: Not that is we could force all pixel values to have a certain distribution, but in that case we have no guarantee that it will correspond in some form to the original image. This why you might not see a properly uniform distribution after equalization. Histogram equalization will try to make the PDF as uniform as possible, while at the same time respecting the original properties of the image.
Lastly but most importantly, histogram equalization was initially developed by assuming continuous random variables. If the original image has intensities modeled as a
continuous random variable $X$ with pdf $p_x(x)$, and the HEQ image result's intensities as a continuous random variable $Y$ with PDF $p_y(y)$, then $p_y(y)$ will be a uniform distribution, if we transform the random variable $X$ by its own CDF, $T$. That is, $Y$ will be a uniformly distributed continuous random variable if we set $Y = T(X)$. However, this is for the continuous case. For real images that are discrete, we are estimating a discrete CDF $T$ from coarse quantization levels, and applying it to a specific number of pixel values. This is why we will not get a perfectly uniform histogram result. Theory proves equalization for a continuous case, while in practice, we are dealing with discrete and quantized images and imperfect CDF estimation no less.