Not snitching street shit is a myth.
The rules change depending on who’s breaking. Same as the consequences .
I can explain why some people don't snitch
Some people grow up in a dysfunctional, broken home, if they have a home at all.
If you grow up moving around from an aunt's house to your grandmother's house, to a foster home and your sleeping on the floor or a couch with 5 people in a 2 bedroom apartment you have no idea what freedom is like.
Then you go to jail and you get your own bed and you're sharing a cell with one other person, it's actually better than the conditions that you grew up in.
So you find yourself in a cell, you have your own bed, and they're feeding you 3 times a day (3 hots and a cot) you're wearing the same clothes as everybody else so you're not looking like a bum, you actually fit in with everybody else. For the first time you're not at the bottom. You have what everybody else has.
Also, if your head is on straight you can get a job in prison (when I did 60 days I worked in the kitchen and we ate better than the regular inmates. We could choose what we wanted to eat, whereas the other inmates could only eat what was being served).
So if you grew up in a fucked up situation being in prison actually isn't that bad, compared to what you're used to. A person like that might stick to the code of the street and serve 5-10-20 years because he thinks that when he gets out he'll get props on the street when he comes home because he didn't snitch on his homies.