Find My iPhone primarily uses the phone to self-report its position when requested over the Internet.
This new "Find My" network (what a stupid name, btw) also allows to use other devices to report positions of nearby devices for those that don't have a data connection (AirTags or iPhones that were powered off).
The problem seems to be that a single toggle controls both features, while the first feature doesn't rely the community network and should remain available even if you opted out.