The United States Military Services make every attempt to assess the moral quality of potential recruits, and several categories of moral offenses may preclude enlistment. This is primarily accomplished based on criminal record.
I should note here that there is no such thing as a "sealed record," or an "expunged record" as far as the military is concerned. The recruiting services have access to law enforcement and FBI investigative records, which -- quite often will list arrests in these categories.
Even if an offense is not found during the recruiter criminal background check, it is likely to come up during a possible (probable) security clearance criminal records check. If an applicant fails to disclose criminal history and it is later discovered, the individual may be charged under federal law, or the Uniform Code of Military Justice for False Statement, and/or Fraudulent Enlistment. (See the article, I Cannot Tell a Lie).
Any offense which resulted in a conviction or "adverse adjudication" counts. Usually, if the charges were dismissed (without conditions), or resulted in an aquittal (finding of "not guilty"), they don't. However, sometimes the military will "count" an offense which resulted in a dismissal. For example, if you were caught shoplifting, and the charges were dismissed because the store owner didn't want to press charges, the military might count it. On the other hand, if the charges were dismissed because the DA determined there wasn't enough evidence to prove you committed the crime, the military probably wouldn't count it. When determining whether or not an offense "counts" for enlistment purposes, the services are primarily interested in whether or not the applicant actually committed the offense, not whether or not a "legal" conviction resulted.
Criminal offenses that fall into one of the below categories "counts" when it comes to enlistment purposes:
Conviction. The act of finding a person guilty of a crime, offense or other violation of law by a court or competent jurisdiction or other authorized adjudicative authority. This includes fines and forfeiture of bond in lieu of trial.
Adverse Adjudication. Any conviction, finding, decision, sentence, judgment, or disposition other than unconditionally dropped, unconditionally dismissed, or acquitted. Participation in a pretrial intervention program as defined below must be processed in the same manner as an adverse adjudication.
Pretrial Intervention/Deferment. Every state has a program by which offenses are diverted out of the regular criminal process for a probationary period. While the programs vary from state to state, they all require the defendant to meet some requirement (e.g., reporting or non-reporting probation, restitution, or community service), after successful completion of which the charge is disposed of in a way that does not result in a final adjudication of guilt. Charges disposed in this manner are processed as an adverse adjudication.
Each of the services have their own standards when it comes to criminal offenses, and whether or not the offense(s) are disqualifying:
Criminal History (Moral) Waivers
The waiver process is a very subjective one. For complete details, see my article, Military Criminal History Waivers.