Both histograms plot the identical 40 observations on a common axis. Only the width of the bins changed.
Both panels show the same 40 values: the small gold ticks under each panel are those same individual points, and the bars in each panel still add up to 40. No observation was added, moved, removed or duplicated — only the way the same points are pooled into bins changed.
Common axis: identical value range 0–100 and an identical count scale (same gridlines in both panels), so heights are directly comparable. The purple curve — the smoothed shape of the same 40 points — is unchanged in both.
Bin width trades off smoothing against detail. It never changes the data.