The processor was designed in the late 1970's. In the early 1980's it was very popular in 8-bit computer designs, and later on it has been a popular embedded microprocessor.
The Z80 was designed to be binary compatible with the Intel 8080 so that most 8080 code could run unmodified on the Z80. The operating system CP/M was designed to run on 8080 based systems and could also run unmodified on Z80 based systems. Z80 systems were in general more powerful and had more powerful facilities than 8080 systems so this option was popular. Some version of CP/M and many CP/M applications came in more powerful Z80 only versions.