The song "Car Alarm" prominently features a car alarm on Youtube, but not on Spotify. This could just be a choice by the artists though, rather than a platform restriction.
Probably not a rule, but maybe more like a liability thing? If people listen to your music while driving, you don’t want them to freak out from the sound effects and then sue you because they got in a car accident.
I have noticed that it's fairly common for many songs to feature random car sounds in their YouTube mixes, but not in the final masters that end up on iTunes and streaming services. It is also relatively common to have "watermarks" (e.g. additional short vocal clips at the beginning and end) added to the YT/Soundcloud mix, presumably to make it easier to figure out if a DJ just ripped the song off YT.
Music videos will often have different versions of the song with added sound effects, a more cinematic intro and outro, and even breaks in the song for a dramatic sequence. These flourishes make sense when you have a video but wouldn’t make any sense in purely audio context.
Here's the regular version, same as Spotify, also on Youtube: https://www.youtube.com/watch?v=N4inWiKCt-E
I don't know if Spotify has music videos, but Apple Music for example does, so you can have both versions.