I really appreciate all these replies.
I understand not buying Bose anything, but in this case it's my wife's car. We like Mazda, there are certain niceties she really wants, and she really was due for a new car since she drove her previous one to the ground. We didn't ask for the trim with the Bose speakers, we went for the trim with the other things she wanted and it only comes with Bose for marketing reasons. My wife doesn't care nor can she hear a difference, and I barely drive her car. I'm just curious if anyone else has noticed the same difference in sound with and without CarPlay.
Having said all that, it is the same song, using an iPhone 14 with Amazon music HD, played with and without CarPlay, connected with a USB cable, and let's say that with CarPlay it sounds Bose-y (bloated, boomy bass, bad treble). For some reason without CarPlay it sounds much better, more natural. I can tweak bass and treble when it's not playing through CarPlay, but I haven't found a way to adjust the sound while playing with it. I otherwise like CarPlay much better than the Mazda infotainment interface.
After all these questions and answers, it's clear to me that it's a CarPlay issue, not a Bose issue since it's the same speakers playing differently. I should have left Bose out of the equation altogether.
I know that people used to good speakers have a bad opinion of the Bose signature coloration and other issues, me included, but I wasn't expecting a backlash for owning a Bose product, especially when I didn't ask for it. I bought a product that only came with Bose speakers. It was not an active choice. Finally, I barely drive the car so it doesn't bother me much. It's much more important that my wife likes her ride. After 25+ years together I gave up trying to educate her in sound quality. She just doesn't get it. I suspect that's the case for many enthusiasts with their spouses.