A former Marine Corps marksmanship instructor has an interesting theory on why gangsters (in the movies and maybe even in real life) decide to shoot their guns sideways: it's actually a good idea in theory to quickly aim a firearm.
It doesn't just look cool; turning your gun sideways actually has some benefits. In firing a weapon, you want to follow an important sighting practice called "building the castle", which is to make sure the front of the weapon and back of the weapon are pointed at the target at a straight line. Proper sight alignment would mean "the three "turrets" or posts into a formation where the tops are all even and the posts all have even spacing between them". That would make for a straight shot.
But that takes time! Gangsters probably unknowingly follow another method called "flash sight picture". That's basically a "good enough" take on spacing and aiming with an emphasis on speed. You're not all the way there, but you're close. Pointing your gun sideways is a pretty good way to get a "flash sight picture".
As he explains the problem with quickfire aiming though:
The problem with tilt style shooting is that it is almost impossible to acquire a reliable sight alignment. The alignment in tilt style is achieved by making the weapon flat and aiming down the side. In theory this works, but in practice you can't accurately measure movement left or right and you have absolutely no way of knowing if the weapon is tilted down below your field of vision from the back of the weapon. This means that you never actually take the same shot twice since you are never actually aiming the same way.
So the rationale behind sideways shooting is that it has speed for aiming but lacks the accuracy for proper sight alignment aiming. Gangsters value speed and are willing to be a little sloppy, whereas marksmen can take their time to aim, aim, aim. Read the whole explanation here. [Quora]