There are laws affecting this at both the state and federal level, but by default, most government records are open for public inspection in the United States. If we can't see what the government is doing and how it's making it's decisions, we can't very well decide how to direct it as voters.
The extent of openness varies from state to state, but I don't know of any states where an autopsy report -- or a related toxicology report -- would be considered secret. When people are dying of unnatural causes, the people have a right to know about the dangers in their community, whether that disease, drugs or violence.
Although some people would argue that there is a privacy right in this information, the approach in the United States is generally that the rights of the living to understand what the government is doing outweigh the privacy rights of dead people.
In Mac Miller's case specifically, the governing law would be California Government Code §§ 6250-77, which provides that:
Except with respect to public records exempt from disclosure by express provisions of law, each state or local agency, upon a request for a copy of records that reasonably describes an identifiable record or records, shall make the records promptly available to any person upon payment of fees covering direct costs of duplication, or a statutory fee if applicable. Upon request, an exact copy shall be provided unless impracticable to do so.
The records "exempt from disclosure" are listed at Section 6254 and include:
Records of complaints to, or investigations conducted by ... any state or local police agency.
California courts have interpreted the law as generally requiring autopsy reports to be disclosed upon request, but exempt from disclosure when the autopsy is part of a law-enforcement investigation:
[T]he coroner and autopsy reports involving the death of Elizabeth Cloer are exempt from public disclosure under the section 6254(f) CPRA exemption for local agency investigatory files compiled for law enforcement purposes. This exemption applies because these reports constitute an investigation of a death that was a suspected homicide in which the prospect of criminal law enforcement proceedings was concrete and definite.
Dixon v. Superior Court, 170 Cal. App. 4th 1271, 1279 (2009).
Because Mac Miller's death was apparently an overdose and therefore not likely to be the subject of a criminal investigation, the autopsy report -- and the toxicology report -- should be treated as a public record subject to disclosure.