When spawning an arrow using a commands, a cave sound will play once the arrow hits a block. This does not happen with arrows shot by players or entities.
How to reproduce
Use this command
/summon minecraft:arrow ~2 ~2 ~
→ Once the arrow hit a block, cave ambience (eerie noise) will play