Thermodynamic origins of two-component multiphase condensates of proteins