I don't have a car, so I can't say this for sure. It sounds like a safety feature. On one hand it does notify you of an incoming text message by changing the volume of your music system. On the other hand, your phone, and maybe your car's sound system, know that you're driving and mitigate distractions from driving by performing those two functions at once?
Alternatively, one thing that seems certain is that notifications in iOS17 are much more efficient. Rather than ringing every device for the same notification, the system seems to know precisely where you are and will notify you in the most unobtrusive means of communication, and on one device only. In this instance, by lowering your sound system's volume it has rendered a notification. More, does your car's sound system have notification settings? I would check that out, and if everything is set properly I would be at ease with its discreet means of notification.
Finally, I could be totally wrong about all of this and there is a notification bug. I read yesterday that the 17.0.3 update resolved a notification bug in 17.0.1. However, .1 seemed to have existed for five minuets so who knows?