That is because most popular depiction of military amount to propaganda and is designed to make you feel good about military. It does not show the ugly or boring or realistic parts of it.
You pretty much never see movie from point of view of civilians living in the place where military operates. Military would not be so cool looking there.
Even death in combat or mistreating civilians is depicted in a way that makes you want to join fight. More realistic (and less popular) depictions don't have thay effect.
What you wrote is just propaganda internalized.