My answer is in two parts
Firstly the simple answer as to why some many gangsters/criminals end up being the subject of films is that they make money... bringing me onto the second part
Why are we so fascinated by gangsters and crims? I reckon it is because on the whole we are law abiding citizens, scared of getting caught of any wrong doing and generally in awe/afraid of law enforcement authorities or maybe just authority in general, so we love to hear or watch stories about those who don't live their lives by standard rules and morals, because deep inside all of us would love to live our lives exactly as we please without recourse to the law. Not that I'm suggesting that we are all murderers or that those who choose the wrong side of the law should be held up as heros (I think it's shocking that the Krays are still to this day regarded as some kind of working class East End heros!
Some films manage quite well to portray the glamour of criminal life while also reminding us of the consequences, I'm thinking of Goodfellas and the like.