How is it like raising humans in jail? Do they not have freedoms they would otherwise have? Sure, it sucks that they're going to die, but farm animals are, in general, not mistreated.
They have no freedom, they're taken care of by people who don't care for their wellbeing, they aren't allowed to leave, they aren't allowed to take care of their most basic urges (mating, for instance), they don't get to raise a family (male children of dairy cattle and egg chickens, for instance, are killed at birth), they aren't allowed to eat what they want (they're fed just enough food to keep them alive), their either beaten or killed for misbehaviour, and they're killed when they're either ready for meat or they're no longer useful (for producing offspring/milk/eggs/whatever the case).
You're right, it's not like prison, it's much, much worse.
At least with hunting, the animal lives a normal life.
"Allowing" means you forfeit some or all of your power to prevent something from happening. You haven't "allowed" a person to die if you've done everything you can to keep them alive but they die regardless of your efforts. If you pulled them out of their water, but their lungs were filled with fluid without your knowledge and they drown, you have not made a choice to let them die. You've done everything you can to save their life. The second situation doesn't apply.
I agree, the situations are very different.