Does iOS hide your Wifi SSID information from your apps? I recently asked a very similar question for Android, where it is a serious concern that any app can record what Wifi SSID you've connected to.
There are these Google, SkyHook, and Apple SSID databases that allow anyone to know which ssid is located where, and the info can be leaked by your neighbour not just your usual devices on your own router.
To quote:

This means that even if you are on a VPN, even if you turn off wifi
scanning, even if you turn off location services and take out your sim
card, even if you stop broadcasting your router's wifi SSID, your apps
will be able to know what wifi SSID you are currently on.
This means that an attacker (read: the surveillance capitalism :) ),
can figure out if/when I am home, and which other devices that
are/were online have used the same SSID. E.g. all my family's
(mandatory) banking apps will know where my family members congregate,
and could change my insurance score, or other &quot;insert dystopian
scenario here&quot;.
Considering what I described, I don't think there is any wiggle room
for you to ever hide your real location from a bad (state, corp,
hacker) actor. Am I wrong? Can I hide my SSID from the apps that are
on my phone?

Is this also how iOS works? I'm aware Apple itself knows what wifi and what color underewear all of your family members are wearing, and that it is selling (yes, sells less data than others but still also sells data) or otherwise using conclusions from analyzing that data and then sending/selling, to other services and/or third parties. But, does it technically allow apps to build this kind of explicit connected device (e.g. SSID) history?
Also, (since I'm less familiar with iOS) is there a feature where your iPhone constantly scans all devices around you (wifi and bluetooth) to improve location or other features? And if so, which specific device names ever end up being visible to your apps? (and how to prevent that)
As of iOS 5, Apple removed the public API for scanning networks.
As of iOS 7, Apple removed the ability of apps to access the MAC address of the user device.
As of iOS 11, apps can no longer access the MAC addresses of devices on the same Wi-Fi network.
As of iOS 13, apps require explicit access permission to Location, granted by the user, to obtain access to the name (SSID) and MAC address of the connected AP.
As of iOS 14, apps require explicit access permission to a new Local Network control, granted by the user, to find and communicate with devices on your local network, and:

Only apps that have already been granted user permission to access precise location data, that have been given permission to set up a virtual private network profile, or that have been given permission to configure a network on the system on the user’s behalf will be able to see the names of Wi-Fi networks the user is connected to.

P.S. The question as currently phrased reflects a misunderstanding of Apple's privacy policies and practices.