AirTags, WiFi iPads, Mac computers, and AirPods do not have GPS at all and still use the Find My network. Whenever a device passes within bluetooth range of the device, it will then be updated from that device using the many methods of localization depending on the device, such as GPS, Cellular triangulation, or WiFi/Bluetooth database. That is also how a Mac or WiFi iPad is able to determine its own location when they do not have GPS or cellular.
The Find My network is an encrypted, anonymous network of hundreds of millions of Apple devices that can help find your stuff, even when it's offline. Nearby devices securely send the location of your missing device to iCloud, so that you can find it in Find My. It's all anonymous and encrypted to protect everyone's privacy.
Use Find My to locate your lost Apple device or AirTag - Apple Support
More information about what location services uses to know where the device is can be seen here:
With your permission, Location Services allows apps and websites (including Maps, Camera, Weather, and other apps) to use information from cellular, Wi-Fi, Global Positioning System (GPS) networks, and Bluetooth to determine your location
About privacy and Location Services in iOS, iPadOS, and watchOS - Apple Support.
Location Services uses device sensors, including GPS and Bluetooth (where those are available), along with crowd-sourced Wi-Fi hotspot and cell tower locations to determine your device’s location.
Legal - Location Services & Privacy- Apple
I have seen no indication that FindMy learns your WiFi network location via a GPS enabled phone, but there is a database of known WiFi networks that are constantly updated. I have not dug much into this database, but apparently Apple used to use a third party service from SkyHook, but possibly maintains the database themselves now. If you want to explore that area more, there is quite a bit of information you can find on the internet about it.
https://apple.stackexchange.com/questions/45630/how-does-find-my-mac-work-since-theres-no-gps-in-a-mac
Some people mistakenly believe that AirTags are GPS devices and they are not. We see many posts where users have placed them on cats/dogs, and they will be lost if they run into the woods with no other nearby device. There are specific GPS trackers that cost more, are larger in size, and require frequent battery charging due to the amount of energy needed, but that is not an AirTag. There are no location updates unless there is an iPhone nearby to transmit that data.