While for most non-transgender people a service record showing a former name does not communicate any sensitive information, for transgender people disclosure of the former name can be equivalent to disclosure of transgender status.
The form DD214 does not list gender, but it does list your name. Congress authorized the correction of military records when it is considered necessary to rectify an error or to remove an injustice.