Military guys always have great sense of humor.
Frankly speaking, drill instructors do not yell to gain respect or instill fear or whatever other ridiculous things I’ve read in the comments. Yelling is just ONE method used to create a chaotic environment for a recruit while they are trying to accomplish any number of tasks in order to guage whether that person can function as a member of a team amid chaos. That’s it. Its not a power trip or an ego boost or to instill fear. It is simply a training tool.