Strange sound playing at random intervals
While it's not possible to check that directly, here are some workarounds:


There are some apps like SoundBunny or SoundFlower which can provide extra kernel extension for pass-through audio, then they can check which processes are accessing sound device.
If you're using Google Chrome (or similar web-browser), look for speaker icon next to tab or window (e.g. check in Window menu).
Check Notifications in System Preferences, and either set Do Not Disturb or disable Play sound for notifications for the recent or all apps. See this post.
Check for log entries, e.g. by the following command:

log stream --level=debug

Check for any file activity by fs_usage command, e.g.

sudo fs_usage

Using trial and error, pause and resume processes to find out about the process, e.g.

ps d
kill -STOP 1234 5678 # Stop processes via PID(s).
kill -CONT 1234 5678 # Resume selected processes.