We have investigated the anisotropic thermal expansion of graphite using ab-initio calculation of lattice dynamics and anharmonicity of the phonons, which reveal that the negative thermal expansion (NTE) in the a-b plane below 600 K and very large positive thermal expansion along the c-axis up to high temperatures arise due to various phonons polarized along the c-axis. While the NTE arises from the anharmonicity of transverse phonons over a broad energy range up to 60 meV, the large positive expansion along the c-axis occurs largely due to the longitudinal optic phonon modes around 16 meV and a large linear compressibility along the c-axis. The hugely anisotropic bonding in graphite is found to be responsible for wide difference in the energy range of the transverse and longitudinal phonon modes polarized along the c-axis, which are responsible for the anomalous thermal expansion behavior. This behaviour is in contrast to other nearly isotropic hexagonal structures like water-ice, which show anomalous thermal expansion in a small temperature range arising from a narrow energy range of phonons.