When you consider the nature of many of Will Smith's characters, you notice that Smith's boisterousness defines them. Roles such as a secret agent, a dating coach, or the last human on earth all sound like instances where you might feel inclined to yell out of frustration or sadness.
Furthermore, Smith's yelling serves to enhance his tall, often intimidating stature. A 6'2" cop would never just talk at his suspects, he would most certainly yell at them.
And apparently directors feel this way too. Across Smith's filmography, you'll find scenes in which he just cranks the volume on his voicebox, going for broke with some mega-acting from the man who gave the world "Parents Just Don't Understand."
The results give viewers an acting trait they've come to love and expect from Smith. If anything, it makes his lines and his characters stick that much more with you, often because their voice still rings in your ears long after the movie ends.