What first attracts you to a piece of music?
The genre. Everything else follows from that. Different types of music have different "rules". If I'm listening to a string quartet I'm probably not attracted by the beat.
Orchestration attracts me — as soon as I hear a piece of ensemble playing I'm trying to visualize the individual players.
When I recognize a particular tune I'm often attracted by the arrangement, the little things the arranger does to bring out certain qualities of instrumental voice or sectional harmony.
I seldom bother to listen to lyrics and words don't attract me to a piece of music.
If I'm listening to a jazz combo, I'll be a lot more attracted to (and a lot more critical of) the sounds of the individual instruments than I would listening to a symphonic piece.
Some melodies attract me because I recognize the cadential sequence of the tune and like to hear the way the harmonies are moving to a specific conclusion. Yet other pieces attract me precisely because I don't know where the music is going or how it's going to get there.
A lot of it depends how I feel at the time — could be how I feel that day or it could be how I'm feeling that decade.
And I've only been discussing the experience of listening.
Playing a piece, either by myself, in a small group, or in a concert band or orchestra is a whole different experience and the things that attract me to a piece I'm playing are much different.