The Metamorphosis by Franz Kafka was written in German and first published in 1915. As we read through English translations, it is always important to be aware that the specific nature of the English phrasing depends on the choices of the translator; an English version is not Kafka's original.
The phrase you have quoted can also be translated as "Was he an animal if music could captivate him so?" In this part of the novella, Gregor is wondering about the degree to which he has become an animal versus the degree to which he retains his humanity. Is what makes us human our outward form or our inward nature?
As Gregor listens to his sister's violin playing he is entranced by the beauty of the music. The three "human" gentlemen are smoking and talking, ignoring the music. In a sense, Gregor in his feelings for the art of music is demonstrating that he is more human and less an animal than gentlemen who have exterior human form.
For Kafka, what defines humanity is the spirit, not the body, and what makes humans uniquely human is our capacity for reason, love, and aesthetic appreciation. The visitors, who cannot hear the sublime beauty of the music, are therefore less human in that respect than Gregor. Part of his enjoyment for the music has to do with his love for his sister, also a human feeling.
Even though the English phrasing is somewhat strange in the translation you are reading, the statement itself is not strange but central to the theme of the work, which is what defines our humanity.