So yield breaks the flow of logic. So you can no longer follow your code sequentially, which leads to weird asynchronous bugs and racing conditions, meaning sometimes the code may work or maybe it won't work on someone else's computer (like if they have a slower CPU). And it makes debugging much more difficult. So basically just never use it, they need to put more warnings in the docs because beginners shouldn't even know about it cause it always causes problems.
The reasons to use it are with very advanced code. For example networking code is asynchronous (you might request data from a remote server and you do not know how long it will take). In those cases a Timer would not work because the network request could take 10ms or 1 whole second. So a yield would be appropriate. But this is only needed in a large scale online kind of game. For single player local games it is never needed (aside from some other advanced stuff) and even for simple games with some connectivity, you could do without it (such as a high score board). It would mainly be of use for complex internet apps, like maybe a video conferencing application or an MMORPG.
If you just need to wait for something, then use a Signal callback function or use a Timer. They are reliable, they will always work, and the chance for a bug is very low. It also makes it easier to test and debug your code, so there is no compelling reason to use yield unless you absolutely have to.
For your case you can do something like this, which is easier to understand.
func _ready():
$AudioStreamPlayer.connect("finished", self, "quit_game")
$AudioStreamPlayer.play()
func quit_game():
get_tree().quit()