I'm afraid the short answer is "Because you told it to."
Let's step through your main program as originally posted; numbers refer to lines:
18 create an instance of DrumKit in d
19 playSnare, which will output "bang bang ba-bang"
20 set the snare variable within d to false
21 playTopHat, which will output "ding ding da-ding"
23 if the snare variable with d is true, playSnare again.
so only if the snare variable is true will playSnare be executed on line 23. With line 20 setting that value to false, then the
test on line 23 will fail, and the code to output the 3rd line is not executed.
Now, if you don't set the value of a variable, it is a good rule not to trust what its value will be when the program runs. In this case, it appears that the Java runtime (or random chance, take your pick) have set the snare variable to true "by default", i.e., it has the value true unless you set it something else. If you take out line 20, then the variable is true, and you get your third line of output.
Welcome to programming! Those of us that do this for a living step through code like this ALL THE TIME, *much* more often than we write code...
rc