A close connection between Be surface segregation and diffusion in MBE GaAs and AlGaAs layers heavily doped with Be is analyzed in the framework of the thermodynamic approach to segregation effects in MBE developed earlier and the simple interstitial-substitutional diffusion model. A good agreement between theoretical and experimental results allows us to suggest that the main origin of the extremely fast Be in-diffusion in GaAs: Be and the deterioration of its surface morphology and luminescence properties is the Be surface segregation resulting in the near-surface solid phase layer enrichment with Be compared to bulk GaAs: Be. The influence of growth parameters (arsenic excess pressure, substrate temperature, growth rate) and doping level on the possibility of beryllium segregation layer formation is discussed.