That's a good point, but things withstand the test of time until they don't. Slavery. Racism. Subjugation of women. Torture as entertainment. These practices were once as widespread as smallpox and polio. Now, they're as widespread as smallpox and polio.
World of difference. Eating animals has happened since, well, our first ancestors crawled out of the ocean.
Prisons are a radically modern invention, maybe more so than any other government institution. It's just they and their logic are so pervasive we don't recognize them for what they are.
Before then "prisons" were more or less temporary affairs, usually just a makeshift holding chamber where people were kept before the actual punishment was meted out (death, torture, or mutilation). But the idea of a building where people are isolated and placed under permanent bodily control for months or years on end by the State (for the betterment of society, or fixing of the individual, or punishment, or whatever) is very much a product of the Enlightenment.