Although bulk III-V alloys exhibit phase separation, vapor-phase epitaxial growth of Ga0.5In0.5P/GaAs (001) at almost-equal-to 900-1000 K. shows spontaneous ordering into the [111]-oriented monolayer (GaP)1 (InP)1 superlattice (the "CuPt" structure). Only two superlattice directions ([111BAR] and [111BAR], which define the CUPt(B) variant) out of four possible are seen. Both [111BAR] and [111BAR] subvariants are observed on flat surfaces or when surface steps are perpendicular to the cation dimers. Ordering was seen also in nonstoichiometric (e.g., Ga.0.7In0.3P) alloys. Previous total-energy calculations at T = 0 show that (i) phase separation is eliminated by the constraint that the alloy and its constituents are coherently matched to a substrate; (ii) the epitaxially stable chalcopyrite order is eliminated by surface reconstruction; (iii) surface reconstruction stabilizes the CuPt(B) variant over the other structures. A relaxed but unreconstructed surface does not lead to any significant preference for ordering. Here we develop thermodynamic (T not-equal 0) calculations based on cluster-variation solutions to a configurational Hamiltonian whose interaction energies are fit to T = 0 total-energy calculations. This shows that (iv) significant CuPt(B) ordering persists to approximately 1500 K not only for the equimolar Ga0.5In0.5P alloy, but also at other compositions, e.g., Ga0.7In0.3P; (v) the cation-terminated surface couples to the fourth layer in such a way as to select the correct three-dimensional CuPt(B) structure; (vi) once formed, the two-dimensional CuPt(B) layers near the surface are remarkably stable towards atomic swaps; (vii) a flat surface leads to a sufficiently small coupling between cation layers so that either of the two CuPt(B) variants can form. We conclude that the main features of the observed ordering can be explained as a thermodynamically stable phase at growth temperatures of either the surface or the first few subsurface layers, depending on how deeply into the alloy atomic mobilities remain sufficiently large.