AudioSource.play not working unless assigning AudioSource.clip again in my script

I have added an AudioSource component on my GameObject, and dragged an AudioClip onto AudioSource’s inspector/panel, then GetComponent().Play() in my script. However it won’t play anything.

The solution is assigning GetComponent().clip = anyAudioClip again in my script before playing it. But it doesn’t make sense right? Then what it the meaning of assigning it on the inspector? Does AudioSource component be reset before game runs?

Check AudioSource settings Audio Source

also check your scene have at least one audioListener !!