This is a good point although i belive you only get exp from killing the mobs with a sword. I am not sure of this but i want to say that is the reason
If they are killed without interaction, do you get anything from it? xp isn't dropped from non-player kills, so that is not counting. IF you create a mechanic that allows you to somehow retrieve the items, it's illegal - you are basically generating money without any work. Spawners in which you need to one-hit the mobs are legal though.