According to official docs, Google estimates wait time in places https://support.google.com/business/answer/6263531?hl=en
Wait time estimates: Shows how long a customer would have to wait before receiving service during different times of the day, as well as the peak wait time for each day of the week. The displayed wait time is based on patterns of customer visits over the last several weeks. Wait time estimation differs for different business types. For instance, a sit-down restaurant's wait time reflects how long customers wait before being seated. Whereas, a grocery store's wait time reflects how long customers wait to check out their items.
How do they do that simply relying on GPS data?