This is not an easy question to answer, because there is no explicit reason given in the poem. So, all answers by this fact alone must be interpretations and opinions. I think there are two possible interpretations. First, it can be argued that the Oddyseus' men were acting like pigs by intruding and eating. More specifically, some scholars speak of the greed of Odysseus' men. Within this framework, greed is less than human and so the punishment was fitting for the crime.
Second, it is also possible to argue that this was a comic scene that Homer introduced to break the epic tension. Authors do have this prerogative. We see this in many other ancient works as well. And in a epic of war and the homecoming of Odysseus, a comic scene can be effective and quite memorable.