Elegantly pairing up mismatched lists

You can use InterpolationOrder for the plot itself to generate the same behavior. I'm assuming here you want the plot you posted in an easier way, not the data handling itself.

{bins, counts} = HistogramList[...];
ListLinePlot[
    {bins, Append[counts, 0]} // Transpose, 
    InterpolationOrder -> 0
]

enter image description here

(You may want to prepend one value to the finished list so that the histogram goes down to zero on the left side as well.)


In the same vein as Andy's answer: Differences[ArrayPad[counts, 1]].UnitStep[x - bins] can be used with Plot[]. Apply PiecewiseExpand[] if need be.


What about this to create the points?

points = Flatten[Through[{PadLeft, PadRight}[{bins, counts}]], {{3, 1}}]