I think that the flames are mostly unintentional. As mentioned before, fats or alcohol added to a hot pan will sizzle and spit over the edge of the pan, catching alight very easily.
That said, it is something that you don't want to happen if you are sauteing or shallow frying because flamed oil gives the food in the pan an awful, acrid and slightly metallic flavour.
Anyone who makes flames just to impress the diners isn't really looking after their food.
But hey, it is kinda fun.