In a histogram, all classes do not need to be the same width, but drawing a histogram with mixed class widths is harder.
For example, if there are the same number of values in two classes but one class is twice the width of the other, its height should be half that of the other in order to ensure that their class rectangles have the same area.
Steel works slag data
Why use mixed class widths?
Histograms with equal class widths easier to draw and explain to others, but the goal of smoothness can sometimes be better attained with narrower classes in regions of high density.