There have been a dozen of movies and shows that had characters depicted army or navy personal that were evil. It called creative freedom.
Actually, you'd be surprised how often the US military steps in regarding their depiction on TV shows or movies. Stargate SG-1 is set in the US Air Force. One of the original plans was to have corrupt officers causing trouble for the SGC. This plan was changed by request of the USAF, who wanted all its officers on the show presented as upstanding people. and so the renegade officers were then turned into the NID, a fictional civilian agency. Since the character Colonel Maybourne was already established before the USAF made its request, he stayed, although the character was evetually disnhounrably discharged (though likely as a result of the legitimate storytelling process than USAF pressure). Interestingly enough, nearly every Marine featured in the Stargate franchise have been at best jerks and at worse actual villains, and the show has even featured a villainous Army officer.