The history and context for the development of Rebetiko is complex. Socially, it has its roots in the experiences of urbanisation in Greece in the 19th and early 20th centuries, and of the forced "exchange of peoples" between Europe and Turkey as the Ottoman Empire collapsed after WW1. A large population of refugees, ethnic Greeks from Asia Minor, brought their music and instruments - at a time when political and cultural élites were more interested in western European influence.
Rebetiko developed as an "urban blues" in the context of the poverty, unemployment, oppression, deprivation (and inevitable prostitution, criminality and drugs) experienced by the recently urbanised slum communities and the refugee populations.
It was very popular in the 1930's through the experience of Nazi occupation. In the 1950's, what had been "the music of the underworld" became a symbol of a new united Greece, emerging from WW2 and civil war. In the process, it became somewhat sanitized, and merges into the development of modern forms of Greek popular music.