How did a "B-side" songs make the charts?

Thanks for the info.