Question about image equalization Let $f$ be an $N \times M$-image and suppose that $g$ is its  equalization.
Question  - Why the equalization does not change the objects, why a car on $f$ does not convert into a bus on $g$?. It is not obious that after the pixel intensity $r_k \mapsto s_k$ recalculation for $g$ 
$$
s_k =\frac{L-1}{NM}\sum_{j=0}^k n_k, k=0,1,\ldots,L-1,
$$
we obtain the same scene as was for $f$! Here  $n_k$ denotes the number of
pixels that have intensity $r_k.$
It probably has the potential to do so, but the probability is marginal. Result of equalization depends on the initial pixel intensity distribution.

Image histogram equalization can have different implementations.
In one possible implementation, you would re-map a whole block of a given intensity level into a new calculated intensity. In such a case, objects will not change shape; boundaries will remain the same.

The aim of equalization is not necessarily the creation of a new image with strictly flat histogram will all bins equally occupied. That won't create a good looking image in any sense. Instead, the aim is to expand the pixel intensities to fully utilize the available dynamic range in the hope of getting a higher constrast with more visible dark regions and unsaturated highlights.