  A-site ordered perovskites, CaCu$_3$B$_4$O$_{12}$, which are derivatives of
conventional ABO$_3$ perovskites, exhibit varying electronic and magnetic
properties. With the objective of examining the role of Cu in this work, we
have studied CaCu$_3$Ti$_4$O$_{12}$ and CaCu$_3$Zr$_4$O$_{12}$ and presented
the cause of the crystallization of A-site ordered perovskite from conventional
ABO$_3$ perovskite and the underlying mechanism leading to the stabilization of
non-trivial and experimentally estabilished G-type antiferromagnetic (G-AFM)
ordering in these systems. The first-principles electronic structure
calculations supplemented with phonon studies show that the formation of A-site
ordered perovskite is driven by Jahn-Teller distortion of the CuO$_{12}$
icosahedron. The crystal orbital Hamiltonian population analysis and magnetic
exchange interactions estimated using spin dimer analysis infers that the
nearest and next-nearest-neighbor interactions (J$_1$ and J$_2$) are direct and
weakly ferromagnetic whereas the third-neighbor interaction (J$_3$) is
unusually strong and antiferromagnetic driven by indirect superexchange
mechanism. The structural geometry reveals that stabilization of G-AFM requires
J$_1$ $<$ 2J$_2$, J$_1$ $<$ 2J$_3$. The experimental and theoretical values of
Neel Temperature agrees well for $U$ $\approx$ 7 eV, highlighting the role of
strong correlation. The magnetic ordering is found to be robust against
pressure and strain.
