The words شرق and غرب have to do with the rising and setting of the sun  respectively  and غرب has the additional  related  meaning of “going away” or “departing ” from which is derived the word غَريب (gharīb)  which means “strange” or “alien” or “foreign