iPhone X randomly plays melodic tune for no apparent reason
As it turns out, the “tune” is the find-phone feature for the “Tile” application. If the center is pushed twice on a tile linked to your phone it will play the tune on the phone (so you can locate it) until the iPhone is unlocked. My wife had a tile on her keys in her purse and evidently it was being accidentally pushed while jammed in her purse.