I think, regardless of a kid's home life, that the appeal of that, "thug life", is far more attractive to every kid's instinct to rebel. I think we're all just as susceptable to falling into that trap, if exposed to it. Does home training make a difference? Sure it does, but sometimes the gang life outweighs the home training.
I don't think there's any hard and fast rule as to why kids become invovled become involved in this crap and I could list a dozen, or more, reasons why I think it happens, but your mileage may vary.