One question is, "What, overall, determines sound quality?". A different, but closely related question is, "What, under my control, determines sound quality?". OP tomcarr suggests the importance of the room.
Interestingly, the room is controllable by us in varying degrees. Some listeners may move the system from floor to floor, room to room, some are constrained to one room (but may adjust room treatments), others are confined to one room they can't do much about, and still others have one room and are told exactly where and only where the speakers may be placed.
So yeah. Two different questions, and "room control" floats between the two.
Enjoy.