For some offences, jail’s pretty much a given; for others, the opposite is true; for a relatively small number though, it can go either way. The difference between going to jail or not, as well as between two people, can come down to things like age, criminal history and the circumstances of the offence. Indirectly though, socio-economic factors can be determinative - things like employment, home-ownership and ability to pay compensation, for bail, drug/alcohol rehab or even a good lawyer - and it there that the real racial differences emerge. The system isn’t intentionally racist but the way it works disadvantages those from lower socio-economic backgrounds which includes an over-representation of minorities.