Its a matter of honor. In the street world or drug scene (does not matter your race) doing time signifies that you have been to battle. Go to prison, you are usually one who is not going to snitch and you have done your time without telling on someone. This may not be true but it is one aspect. Relating it to the military, when a combat veteran returns people look at them with respect because of what they went through. It is the same thing on the street, prison is seen as a corresponding experience. The rap songs glorify it because, face it, it sells to the young street crowd. And it matters not whether you are black or white they are all listening to it.