According to this link, here are major purpose of characters shouting their attacks:
The idea that words can grant power is a cross cultural phenomenon that shows up frequently in the earliest tales of swords and sorcery. Members of the Sinitic ethnolinguistic family in particular tend to ascribe special importance to the power of written characters, and the belief that special words can invoke control over supernatural power permeates their folklore (just ask your local Shinto, Buddhist, or Taoist practitioner if they've donated to a shrine or temple to have a talisman written lately). The magic power of spoken and written words was also a key concept in Ancient Egyptian religion and Ritual Magic.
- Helps with building up chi
In terms of realism, this has some ground as traditional and even some current practitioners of martial arts hold the belief that accompanying statements and/or vocal noises alongside execution build up their chi, thereby increasing the power and efficacy of their moves and techniques.
Put less spiritually, saying a phrase at the right time during an attack ensures proper breathing. A call used for this reason is known as a kiai.
- Secret societies & passing down of techniques
The naming of attacks also served a more practical purpose as many martial arts schools, Chinese ones in particular, used to be secret societies. The passing down of techniques was done orally and giving them esoteric names often facilitated this transmission.
Kiai has the potential to startle the opponent and give you an opening.
This is also often combined with a spellcaster's Invocation, with the final part of the incantation being the name of the spell, cried out just as the spell is triggered (Spirit of Fire, gather into my hand and incinerate my enemies! FIREBALL!). A character who grows in power will eventually graduate to being able to do the initial incantation mentally, turning the final trigger into this trope completely.
A variant has a Combat Commentator recognizing the attacks being used (usually with a line like "That's the legendary such-and-such-and-something-or-other technique!") and explaining them to any other characters watching (and the audience, of course).
- When there's no voice acting
Another variant, primarily found in video games, displays the attack name on screen as it is being executed, without a vocal "call". This typically happens in games where there is no voice acting; the call is implied. In fact, flamboyant attack/technique names are pretty much a trope in and of themselves.
- Effective narrative device
There isn't really a simpler way to let the audience know that Captain Kirk's next phaser blast isn't supposed to kill the alien, or that Judge Dredd's next bullet is supposed to go "boom". Especially in manga, it's particularly difficult to let the reader know what special attacks are used without either motion or color, so having the characters say it is probably the most practical solution.