There are a number of solutions and retail situations where beacons are used to connect the smartphone user to WiFi. How does this work?
Beacons only provide a known unique id for a place. An app on the smartphone sees that id and knows, usually via some central database, the WiFi connection settings. The app uses those settings to programmatically set up the WiFi connection.
There’s obviously a chicken and egg situation here as the app needs the WiFi connection (or cellular) to access the central database of beacon ids vs WiFi settings. The mechanism doesn’t work when cellular connections are slow, poor or the user, perhaps a tourist, has turned off roaming to save costs.
For more reliable operation of the mechanism, the app can choose to fetch and cache nearby/popular beacons vs WiFi combinations, ahead of time, when it does have Internet connectivity.