That's part of it, and the laws are part of it, too. But, I believe policing accounts for a significant portion of that disparity between the US and other developed, democratic-ish, nations.
Here's why I believe that: Black folks are arrested at a rate of 2.5 times, or more, that of white folks, despite committing crimes at about the same rate as white folks (actually, for some classes of crime, such as marijuana use, whites commit crime at a higher rate). This tells me that police exercise discretion when making arrests. And, were they to exercise that discretion equally across races, there would be either a lot fewer or a lot more arrests, and a lot fewer or a lot more people being imprisoned.
In short, to put it into language that HN folks will understand, it is like a sales funnel. Police are an early stage in the funnel for filling prisons, and every stage in the funnel plays a role in the prison industrial complex.
Sources on the 2.5, or higher, number (any time race comes up as a factor, someone will challenge it...so, preemptive response):