Absolute morality is not based in human opinion. It is something that is external to people, waiting to be discovered. Thus the analogy.
A simple example of this is slavery. Slavery is, in an absolute sense, immoral. What societies have discovered is that part of the intrinsic nature of humanity is to respect the freedom of others. In a perfectly analogous way, societies have discovered that part of the intrinsic nature of light is that is it composed of photons. These are discoveries of truths that have always been with us, but which are being accessed only in increments.
Ah, but morals do apply to everyone, just as physics do. If I enslave you in a country that permits slavery, I'm still doing something immoral. That was true even when everyone enslaved everyone; it was immoral. But what does that mean, "immoral"? It means that the act in question is damaging to the society in which it takes place. Slavery is objectively bad. Slavery is immoral in an absolute sense.
So if I do something and nobody says that it's immoral, it doesn't matter. What matters is whether or not it really is immoral, because immorality has to do with the consequences of actions on the society. And no, that doesn't mean that if I enslave someone who deserves it then it's not immoral. Nobody deserves to be enslaved because it is immoral at an absolute level. It may be expedient. It may be necessary. But it is immoral, and the society will be damaged by the enslavement.
So when we look at prisons, we can see that we are enslaving people. It's immoral. That doesn't mean that we let them all go because they'd do more harm to our society than their enslavement. But we have to recognize that they are enslaved and that it's immoral. We need to find another solution to preventing people from doing immoral things because putting them in prisons is still damaging to our society.