Many want Siri rather than Alexa.
Many want better sound quality, which the HomePod offers.
Many will like the looks of the HomePod over Sonos.
Many will want the improved integration that the HomePod offers over Sonos.
There are many other reasons some may choose one over the other. Just because you prefer Sonos doesn't mean the same will be true for everyone else.
Apple tried to sell the HomePod as a quasi-audiophile speaker. It may be good, but it's nowhere near audiophile quality. And even if the HomePod did have the engineering chops to be at or near audiophile quality, its source of streaming music isn't. Apple Music uses a lossy format for streaming. It doesn't even use Apple's lossless format, ALAC, which claims to be as good quality-wise as a CD. And if the numbers quoted for it's performance are accurate, it is.
But that's not what AM uses. The files would be too big and they would eat up a lot of a persons monthly data allotment if you end up streaming music thru your cell phone data plan. So they went for smaller sized song files and a lossy compression format, AAC. If you have fewer data points you lose sound quality and there isn't a way around that. Apple Music streams at 256 kbs. A competitor that calls itself audiophile quality, Tidal, has a service (HiFi) that streams at 1,411 kbs, more than 5.5 times the data that
Apple Music has. Music reviews says Tidal sounds great, provided you have good speakers to play it through. And it's at least twice as expensive as Apple Music without having the selection of songs or artists. Tidal has the same problem with their service that Apple has with the HomePod: People will choose good enough over it sounds better but costs more.
You might be able to say the HomePod sounds 'better' than Spotify and if you are comparing a $30 speaker to a $350 dollar one it probably does. Congratulations, you beat a very cheap speaker playing a lower quality data stream song.
I am assuming that you can now stream to a HomePod using AirPlay2, which should mean that you can improve the sound source up to CD quality, if you have music stored on your computer. I think Apple has upgraded a large portion of iTune downloadable songs to ALAC versions, and certainly if you have ripped CD's stored somewhere those would qualify. I haven't seen anything online yet talking about any sound improvements of Airplay2 vs Apple Music but I'll admit I haven't looked in the last 2 weeks either. But thats NOT using Apple Music, and most people, including you, are comparing Apple Music to Spotify. Both are serviceable. Both are relatively affordable. Both are unremarkable, quality wise.
Sonos, with Airplay2, can also play CD quality and from more sources.