Isn't the US military very diverse, so why is the assumption that they will obey illegal orders, especally ones that are often targetted at their own communities.

Historically its not easy to make militaries committ attrocities against their own communities, thats usually more doings of a heavily ideological policeforces which takes time to build up