Oxygen defect clustering in uranium dioxide had been indicated in powder neutron diffraction measurements, and an empirical clustering mechanism had been proposed to explain the data. However, using first-principles LSDA+U calculations, we find that this empirical model, in fact, cannot work. A more physically reasonable model is proposed based on a thermodynamical competition between point defects and cuboctahedral clusters. This mechanism interprets the puzzled origin of the observed asymmetric interstitial O′ and O″ naturally. It also gives a good and consistent agreement with all available experimental data, except the high occupation of the O″ site.