That makes sense in that either package will satisfy a requirement for pulseaudio-daemon.
I assume I must do something to make one of the pair the default.
What I have not figure out is how is the pipewire RPM is preferered over the pulseaudio RPM to provide the pulseaudio-daemon.
How is that done?
You don’t need to set anything up, you can swap between arbitrary packages.
The dnf command swap x y just means remove x AND install y.
For example you can swap the nano text editor with the 0ad strategy game:
dnf swap nano 0ad
I use this often when testing different versions/variations of packages.
dnf swap foo ./foo-with-bar-1.2.3.rpm
The Provides: in spec files defines capabilities (sometimes called virtual packages). It’s for dependency solving. If a package foo provides bar, you can do dnf install bar, or Requires: bar in another package and get foo.
Solving is done by the solver (libsolv or whatever used by other package manager) at install time. There is no preference/priority in the spec file (it would be pointless since another package can just set themselves higher).
Even if there was some kind of preference/priority, it’s irrelevant in this case since Fedora (Workstation, and some spins) installs pipewire-pulseaudio explicitly by name (in multimedia group), not by pulseaudio-daemon.
Again, which package requires pipewire-pulseaudio? It will be easier to talk with specific examples, so I can reproduce exactly what you’re doing, and answer why it works or doesn’t work.
You also seem to treat pipewire-pulseaudio and pipewire as equivalent. They are not; you can install either one without the other.
Packages installed by groups indeed can be removed (unless other packages require them). i.e. you can dnf group install foo and then dnf remove every member of @foo
There are only a few packages in Fedora that require pipewire by name, one of them being mutter. So if you use mutter (everyone who uses GNOME), you can’t remove pipewire (but you can remove pipewire-pulseaudio).