Photos of the food, at least in the US, started with "immigrant" restaurants. When Thai/Vietnamese/Chinese restaurants started opening up in areas without high concentrations of those people, they'd put photos in the menu so you could see what you were getting since that wouldn't be clear from the names or descriptions in the menu. A lot of these restaurants were cheap, which is why I think you associate it with low-quality restaurants.
U.S. chains like IHOP and Denny's beat the mom-and-pop immigrant restaurants by decades (and they are truly terrible). I wouldn't be surprised if they got the idea from even lower quality chains like McDonald's, but I'm not old enough to know.