Histogram (automatic binning)

There are different methods for choosing widths of bins for a histogram, like Freedman-Diaconis rule. In Mathematica, without choosing a specific method, with the command ~Histogram[data]~, we can produce a histogram for a set of data. My question is: How does Mathematica decide which method is better for a given data?