In cold dark matter (CDM) cosmology, objects in the Universe have grown under
the effect of gravity of dark matter. The intracluster gas in a galaxy cluster
was heated when the dark-matter halo formed through gravitational collapse. The
potential energy of the gas was converted to thermal energy through this
process. However, this process and the thermodynamic history of the gas have
not been clearly characterized in connection with with the formation and
evolution of the internal structure of dark-matter halos. We show that
observational data of high-mass galaxy clusters lie on a plane in the
three-dimensional logarithmic space of their characteristic radius $r_s$, mass
$M_s$, and X-ray temperature $T_X$ with a very small orthogonal scatter. The
tight correlation indicates that the gas temperature was determined at a
specific cluster formation time, which is encoded in $r_s$ and $M_s$. The plane
is tilted with respect to $T_X \propto M_s/r_s$, which is the plane expected in
case of simplified virial equilibrium. We show that this tilt can be explained
by a similarity solution, which indicates that clusters are not isolated but
continuously growing through matter accretion from their outer environments.
Numerical simulations reproduce the observed plane and its angle. This result
holds independently of the gas physics implemented in the code, revealing the
fundamental origin of this plane.