The 38-atom Lennard-Jones cluster has a paradigmatic double-funnel energy landscape. One funnel ends in the global minimum, a face-centered-cubic (fcc) truncated octahedron. At the bottom of the other funnel is the second lowes energy minimum which is an incomplete Mackay icosahedron. We characterize the energy landscape in two ways. First, from a large sample of minima and transition states we construct a disconnectivity graph showing which minima are connected below certain energy thresholds. Second, we compute the free energy as a function of a bond-order parameter. The free energy profile has two minima, one which corresponds to the fcc funnel and the other which at low temperature corresponds to the icosahedral funnel and at higher temperatures to the liquidlike state. These two approaches show that the greater width of the icosahedral funnel, and the greater structural similarity between the icosahedral structures and those associated with the liquidlike state, are the cause of the smaller free energy barrier for entering the icosahedral funnel from the liquidlike state and therefore of the cluster's preferential entry into this funnel on relaxation down the energy landscape. Furthermore, the large free energy barrier between the fcc and icosahedral funnels, which is energetic in origin, causes the cluster to be trapped in one of the funnels at low temperature. These results explain in detail the link between the double-funnel energy landscape and the difficulty of global optimization for this cluster.