They're not legal, but other countries have a less stringent outlook to them, than others. As proved by the point that as the fireworks are going off in that top vid, the game is still going on.
If someone so much as lit up a flare in a UK ground, the referee would be taking the players off the pitch, and there'd be calls to shut the ground.
Other countries are just not as anal, or up tight about it, as over here.
In the case of some clubs in some countries, say like Italy, the police don't come inside the grounds, but the crowd is policed by the ultra's themselves, and their own stewards, so they pretty much have free-reign to do what they want within some grounds.
I like the spectacle personally, as they always add atmosphere to a ground....
Which is probably why I sneaked an 18 inch one in to the Ataturk in 2005.
When I replay the match, I can still see it, and where I am in the crowd at the end, when I've got a red flare burning, and everyone going mental.