In my opinion most recurrent dreams are unfinished business of some kind.
I think the psychoanalysts had the right theoretical framing when they considered dreams as being manifestations of the unconscious. They thought of the unconscious mind as a base level in your mind where all your thoughts, experiences and emotions were contained but without any degree of organization. A place naive to logic, to time, to notions of right or wrong and free of ego. Almost like a childlike version of you.
Sometimes events can happen in your life that shake you up or bother you but you don't realize it because the conscious mind keeps a lid on it, keeps you focused on what you're doing. Then you go to sleep and have a dream about it and you realize "Oh right, that did actually bother me."
Another element from psychoanalysis is repetition. The idea that the mind tries to repeat a trauma over and over again until a solution is found. In your case maybe having higher-ups yelling at you over dumb shit left a mark on your unconscious and it's trying to find resolution. That's just an example, you're the one who has to find the proper meaning of your own dream. The dream might go on over and over again until you gain mastery over the feared situation. So for example maybe in the dream you have to go up to your sergeant (or whoever) and tell him that you're not even in the army anymore, that he's not the boss of you and that being the shaving police is dumb as hell too. Then maybe your unconscious mind will be satisfied that the dangerous situation has been mastered and the dream repetition will end. It's harder to do than it sounds because in the dream you genuinely think the dream is real, so the proper conclusion can only be reached if you truly have no fear facing the situation that awaits you at the base.