Slot machines are practically the “furniture” that can be found in any Casino anywhere in the world. Slot games are said to have been invented around 1871 in San Francisco.
I think the popularity of slot machines is due to their simple mechanics to implement and play, it's a captivating game that anyone can play... in the "simplest" mode, just pull a lever.
Just for the record though, most updated slot machines doesn't have a lever anymore.
But there are still some, and yeah the experience is very much different as compare to like pushing the buttons today.
Not to mention that the lack of a person to control the game was also very profitable for the casinos in the beginning, which could place several machines without having to hire a single employee.
That was in the beginning, but now with the huge success of slot machines, this has become a niche, there are a lot of competing companies producing better slot machine experience every year and with that lot of personnel to hire for maintenance and obviously to code the game itself.