They certainly don't consent to being slaughtered and eaten. That's why it's obvious to me that these laws are primarily about outlawing behaviour that most people are simply uncomfortable with. Beastliality makes me feel uncomfortable too, but not as much as a pressurized rod to the forehead so people can sit down to enjoy a steak. In some countries they still just slit throats and wait for animals to bleed out.
In some countries? Halal is much more widespread than that. In the UK, a loophole in the animal cruelty law has been created just to accomodate it.