The answer to my question is that passwords can be shared between iOS and macOS. (And between different users, who of course don't have the same keychain.) I'd recalled doing it, but on a new network and a new computer it wasn't working, so I called Apple and a Senior Advisor said that my memory was incorrect because such a thing was not possible. I started this discussion to see if I was crazy.
Then I tried a different network. When I was entering the password on my phone I noticed a message saying, "You can also access this Wi-Fi network by bringing your iPhone near any iPhone, iPad, or Mac which has connected to this network and has you in their contacts." So such a thing was possible. I entered the password, and then when I selected that network on my Mac, I got this message on my phone: "Do you want to share the Wi-Fi password for '[network name]' with '[Mac name]'?" I clicked "Share Password" and it worked.
So I am not crazy and the Senior Advisor was (confidently) misinformed. Thank you.