Laws governing rap sheet disposition are set at the level of state law, for state crimes, I will focus on Washington state. Rap sheets have "always" been sent to prisons and there is no effective way of tracing the political rationale behind the laws. The premise is that the prison needs to know if they are dealing with a serial killer or an embezzler, for obvious practical reasons. At various times, political movements may result in a change in the law, but any lacuna that you perceive in the laws is due to political facts. We can at least say what the relevant laws are.
RCW 10.97.050 is the law enabling dissemination of records. Subsection 1 states that "Conviction records may be disseminated without restriction", therefore I can fill out this form and get information on someone. Subsections 2-3 also allow dissemination of nonconviction data to another criminal justice agency, as long as the purpose is administration of criminal justice, with some exceptions in RCW 13.50.260, also in order to comply with the law (a statute, court rule etc), including a contractual relation between an individual and a criminal justice agency, etc.
Since the law does not grant an absolute right of privacy to a convict with respect to their arrests and convictions, from a legal perspective there is no violation of their privacy. The criminal history is a government record, and disclosure (not privacy) is mandated by state law except in specified conditions (e.g. you cannot obtain a state employee's home address since that information is exempted under numerous clauses in the law). Convict privacy is relegated to Ch. 10.97 RCW, cited above.
No part of the law imposes specific security requirements on prisons to keep records from falling into wrong hands. There is a law prohibiting convicts from having guns or knives in prison, which is imposed on the convict. No law prohibits a prisoner from being in possession of information (such a law is unlikely to survive energetic judicial review), and no law mandating an infallible system of keeping criminal history out of the hands of inmates.
This is the fact sheet on criminal records maintained by the state patrol which gives more details.